Title: [159984] trunk/Source/WebKit2
Revision
159984
Author
ander...@apple.com
Date
2013-12-02 17:11:47 -0800 (Mon, 02 Dec 2013)

Log Message

Add versioned structs for the remaining clients
https://bugs.webkit.org/show_bug.cgi?id=125123

Reviewed by Andreas Kling.

* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKContextConnectionClient.h:
* UIProcess/API/C/WKContextDownloadClient.h:
* UIProcess/API/C/WKContextHistoryClient.h:
* UIProcess/API/C/WKContextInjectedBundleClient.h:
* UIProcess/API/C/WKOriginDataManager.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (159983 => 159984)


--- trunk/Source/WebKit2/ChangeLog	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-03 01:11:47 UTC (rev 159984)
@@ -1,5 +1,19 @@
 2013-12-02  Anders Carlsson  <ander...@apple.com>
 
+        Add versioned structs for the remaining clients
+        https://bugs.webkit.org/show_bug.cgi?id=125123
+
+        Reviewed by Andreas Kling.
+
+        * UIProcess/API/C/WKContext.h:
+        * UIProcess/API/C/WKContextConnectionClient.h:
+        * UIProcess/API/C/WKContextDownloadClient.h:
+        * UIProcess/API/C/WKContextHistoryClient.h:
+        * UIProcess/API/C/WKContextInjectedBundleClient.h:
+        * UIProcess/API/C/WKOriginDataManager.h:
+
+2013-12-02  Anders Carlsson  <ander...@apple.com>
+
         Move WKContext clients to separate files
         https://bugs.webkit.org/show_bug.cgi?id=125121
 

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -48,19 +48,32 @@
 typedef void (*WKContextNetworkProcessDidCrashCallback)(WKContextRef context, const void *clientInfo);
 typedef void (*WKContextPlugInInformationBecameAvailableCallback)(WKContextRef context, WKArrayRef plugIn, const void *clientInfo);
 
-struct WKContextClient {
+typedef struct WKContextClientBase {
     int                                                                 version;
     const void *                                                        clientInfo;
+} WKContextClientBase;
 
+typedef struct WKContextClientV0 {
+    WKContextClientBase                                                 base;
+
     // Version 0.
     WKContextPlugInAutoStartOriginHashesChangedCallback                 plugInAutoStartOriginHashesChanged;
     WKContextNetworkProcessDidCrashCallback                             networkProcessDidCrash;
     WKContextPlugInInformationBecameAvailableCallback                   plugInInformationBecameAvailable;
-};
-typedef struct WKContextClient WKContextClient;
+} WKContextClientV0;
 
+// FIXME: Deprecate.
 enum { kWKContextClientCurrentVersion = 0 };
+typedef struct WKContextClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
 
+    // Version 0.
+    WKContextPlugInAutoStartOriginHashesChangedCallback                 plugInAutoStartOriginHashesChanged;
+    WKContextNetworkProcessDidCrashCallback                             networkProcessDidCrash;
+    WKContextPlugInInformationBecameAvailableCallback                   plugInInformationBecameAvailable;
+} WKContextClient;
+
 enum {
     kWKProcessModelSharedSecondaryProcess = 0,
     kWKProcessModelMultipleSecondaryProcesses = 1

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextConnectionClient.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContextConnectionClient.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextConnectionClient.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -30,14 +30,26 @@
 
 typedef void (*WKContextDidCreateConnection)(WKContextRef context, WKConnectionRef connection, const void* clientInfo);
 
-struct WKContextConnectionClient {
+typedef struct WKContextConnectionClientBase {
     int                                                                 version;
     const void *                                                        clientInfo;
+} WKContextConnectionClientBase;
+
+typedef struct WKContextConnectionClientV0 {
+    WKContextConnectionClientBase                                       base;
+
+    // Version 0.
     WKContextDidCreateConnection                                        didCreateConnection;
-};
-typedef struct WKContextConnectionClient WKContextConnectionClient;
+} WKContextConnectionClientV0;
 
+// FIXME: Deprecate.
 enum { kWKContextConnectionClientCurrentVersion = 0 };
+typedef struct WKContextConnectionClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
 
+    // Version 0.
+    WKContextDidCreateConnection                                        didCreateConnection;
+} WKContextConnectionClient;
 
 #endif // WKContextConnectionClient_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextDownloadClient.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContextDownloadClient.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextDownloadClient.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -40,9 +40,15 @@
 typedef void (*WKContextDownloadDidCancel)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
 typedef void (*WKContextDownloadProcessDidCrashCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
 
-struct WKContextDownloadClient {
+typedef struct WKContextDownloadClientBase {
     int                                                                 version;
     const void *                                                        clientInfo;
+} WKContextDownloadClientBase;
+
+typedef struct WKContextDownloadClientV0 {
+    WKContextDownloadClientBase                                         base;
+
+    // Version 0.
     WKContextDownloadDidStartCallback                                   didStart;
     WKContextDownloadDidReceiveAuthenticationChallengeCallback          didReceiveAuthenticationChallenge;
     WKContextDownloadDidReceiveResponseCallback                         didReceiveResponse;
@@ -54,9 +60,26 @@
     WKContextDownloadDidFailCallback                                    didFail;
     WKContextDownloadDidCancel                                          didCancel;
     WKContextDownloadProcessDidCrashCallback                            processDidCrash;
-};
-typedef struct WKContextDownloadClient WKContextDownloadClient;
+} WKContextDownloadClientV0;
 
+// FIXME: Deprecate.
 enum { kWKContextDownloadClientCurrentVersion = 0 };
+typedef struct WKContextDownloadClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
 
+    // Version 0.
+    WKContextDownloadDidStartCallback                                   didStart;
+    WKContextDownloadDidReceiveAuthenticationChallengeCallback          didReceiveAuthenticationChallenge;
+    WKContextDownloadDidReceiveResponseCallback                         didReceiveResponse;
+    WKContextDownloadDidReceiveDataCallback                             didReceiveData;
+    WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback           shouldDecodeSourceDataOfMIMEType;
+    WKContextDownloadDecideDestinationWithSuggestedFilenameCallback     decideDestinationWithSuggestedFilename;
+    WKContextDownloadDidCreateDestinationCallback                       didCreateDestination;
+    WKContextDownloadDidFinishCallback                                  didFinish;
+    WKContextDownloadDidFailCallback                                    didFail;
+    WKContextDownloadDidCancel                                          didCancel;
+    WKContextDownloadProcessDidCrashCallback                            processDidCrash;
+} WKContextDownloadClient;
+
 #endif // WKContextDownloadClient_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextHistoryClient.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContextHistoryClient.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextHistoryClient.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -34,17 +34,34 @@
 typedef void (*WKContextDidUpdateHistoryTitleCallback)(WKContextRef context, WKPageRef page, WKStringRef title, WKURLRef URL, WKFrameRef frame, const void *clientInfo);
 typedef void (*WKContextPopulateVisitedLinksCallback)(WKContextRef context, const void *clientInfo);
 
-struct WKContextHistoryClient {
+typedef struct WKContextHistoryClientBase {
     int                                                                 version;
     const void *                                                        clientInfo;
+} WKContextHistoryClientBase;
+
+typedef struct WKContextHistoryClientV0 {
+    WKContextHistoryClientBase                                          base;
+
+    // Version 0.
     WKContextDidNavigateWithNavigationDataCallback                      didNavigateWithNavigationData;
     WKContextDidPerformClientRedirectCallback                           didPerformClientRedirect;
     WKContextDidPerformServerRedirectCallback                           didPerformServerRedirect;
     WKContextDidUpdateHistoryTitleCallback                              didUpdateHistoryTitle;
     WKContextPopulateVisitedLinksCallback                               populateVisitedLinks;
-};
-typedef struct WKContextHistoryClient WKContextHistoryClient;
+} WKContextHistoryClientV0;
 
+// FIXME: Deprecate.
 enum { kWKContextHistoryClientCurrentVersion = 0 };
+typedef struct WKContextHistoryClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
 
+    // Version 0.
+    WKContextDidNavigateWithNavigationDataCallback                      didNavigateWithNavigationData;
+    WKContextDidPerformClientRedirectCallback                           didPerformClientRedirect;
+    WKContextDidPerformServerRedirectCallback                           didPerformServerRedirect;
+    WKContextDidUpdateHistoryTitleCallback                              didUpdateHistoryTitle;
+    WKContextPopulateVisitedLinksCallback                               populateVisitedLinks;
+} WKContextHistoryClient;
+
 #endif // WKContextHistoryClient_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContextInjectedBundleClient.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContextInjectedBundleClient.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContextInjectedBundleClient.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -33,19 +33,42 @@
 typedef void (*WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback)(WKContextRef page, WKStringRef messageName, WKTypeRef messageBody, WKTypeRef* returnData, const void *clientInfo);
 typedef WKTypeRef (*WKContextGetInjectedBundleInitializationUserDataCallback)(WKContextRef context, const void *clientInfo);
 
-struct WKContextInjectedBundleClient {
+typedef struct WKContextInjectedBundleClientBase {
     int                                                                 version;
     const void *                                                        clientInfo;
+} WKContextInjectedBundleClientBase;
 
+typedef struct WKContextInjectedBundleClientV0 {
+    WKContextInjectedBundleClientBase                                   base;
+
     // Version 0.
     WKContextDidReceiveMessageFromInjectedBundleCallback                didReceiveMessageFromInjectedBundle;
     WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback     didReceiveSynchronousMessageFromInjectedBundle;
+} WKContextInjectedBundleClientV0;
 
+typedef struct WKContextInjectedBundleClientV1 {
+    WKContextInjectedBundleClientBase                                   base;
+
+    // Version 0.
+    WKContextDidReceiveMessageFromInjectedBundleCallback                didReceiveMessageFromInjectedBundle;
+    WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback     didReceiveSynchronousMessageFromInjectedBundle;
+
     // Version 1.
     WKContextGetInjectedBundleInitializationUserDataCallback            getInjectedBundleInitializationUserData;
-};
-typedef struct WKContextInjectedBundleClient WKContextInjectedBundleClient;
+} WKContextInjectedBundleClientV1;
 
+typedef struct WKContextInjectedBundleClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
+
+    // Version 0.
+    WKContextDidReceiveMessageFromInjectedBundleCallback                didReceiveMessageFromInjectedBundle;
+    WKContextDidReceiveSynchronousMessageFromInjectedBundleCallback     didReceiveSynchronousMessageFromInjectedBundle;
+
+    // Version 1.
+    WKContextGetInjectedBundleInitializationUserDataCallback            getInjectedBundleInitializationUserData;
+} WKContextInjectedBundleClient;
+
 enum { kWKContextInjectedBundleClientCurrentVersion = 1 };
 
 #endif // WKContextInjectedBundleClient_h

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h (159983 => 159984)


--- trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h	2013-12-03 00:54:12 UTC (rev 159983)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKOriginDataManager.h	2013-12-03 01:11:47 UTC (rev 159984)
@@ -55,15 +55,29 @@
 
 // OriginDataManager Client
 typedef void (*WKOriginDataManagerChangeCallback)(WKOriginDataManagerRef originDataManager, const void *clientInfo);
-struct WKOriginDataManagerChangeClient {
-    int                                 version;
-    const void *                        clientInfo;
-    WKOriginDataManagerChangeCallback   didChange;
-};
-typedef struct WKOriginDataManagerChangeClient WKOriginDataManagerChangeClient;
 
+typedef struct WKOriginDataManagerChangeClientBase {
+    const void *                                                        clientInfo;
+    int                                                                 version;
+} WKOriginDataManagerChangeClientBase;
+
+typedef struct WKOriginDataManagerChangeClientV0 {
+    WKOriginDataManagerChangeClientBase                                 base;
+
+    // Version 0.
+    WKOriginDataManagerChangeCallback                                   didChange;
+} WKOriginDataManagerChangeClientV0;
+
+// FIXME: Deprecate.
 enum { kWKOriginDataManagerChangeClientVersion = 0 };
+typedef struct WKOriginDataManagerChangeClient {
+    int                                                                 version;
+    const void *                                                        clientInfo;
 
+    // Version 0.
+    WKOriginDataManagerChangeCallback                                   didChange;
+} WKOriginDataManagerChangeClient;
+
 WK_EXPORT void WKOriginDataManagerStartObservingChanges(WKOriginDataManagerRef originDataManager, WKOriginDataTypes types);
 WK_EXPORT void WKOriginDataManagerStopObservingChanges(WKOriginDataManagerRef originDataManager, WKOriginDataTypes types);
 WK_EXPORT void WKOriginDataManagerSetChangeClient(WKOriginDataManagerRef originDataManger, const WKOriginDataManagerChangeClient* client);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to