Commit dcc738b3 authored by andersca@apple.com's avatar andersca@apple.com

Add versioned structs for all clients except the ones in WKContext.h

https://bugs.webkit.org/show_bug.cgi?id=125120

Reviewed by Andreas Kling.

* Shared/API/c/WKConnectionRef.h:
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/API/C/WKGeolocationManager.h:
* UIProcess/API/C/WKIconDatabase.h:
* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/API/C/WKPageContextMenuClient.h:
* UIProcess/API/C/WKPageFindClient.h:
* UIProcess/API/C/WKPageFindMatchesClient.h:
* UIProcess/API/C/WKPageFormClient.h:
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPagePolicyClient.h:
* UIProcess/API/C/WKPageUIClient.h:
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159981 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d7423c7
2013-12-02 Anders Carlsson <andersca@apple.com>
Add versioned structs for all clients except the ones in WKContext.h
https://bugs.webkit.org/show_bug.cgi?id=125120
Reviewed by Andreas Kling.
* Shared/API/c/WKConnectionRef.h:
* UIProcess/API/C/WKCookieManager.h:
* UIProcess/API/C/WKDatabaseManager.h:
* UIProcess/API/C/WKGeolocationManager.h:
* UIProcess/API/C/WKIconDatabase.h:
* UIProcess/API/C/WKNotificationProvider.h:
* UIProcess/API/C/WKPageContextMenuClient.h:
* UIProcess/API/C/WKPageFindClient.h:
* UIProcess/API/C/WKPageFindMatchesClient.h:
* UIProcess/API/C/WKPageFormClient.h:
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WKPagePolicyClient.h:
* UIProcess/API/C/WKPageUIClient.h:
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageBanner.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageFullScreenClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
* WebProcess/InjectedBundle/API/c/WKBundlePagePolicyClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageResourceLoadClient.h:
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
2013-12-02 Anders Carlsson <andersca@apple.com>
Split bundle page clients out into separate headers
......
......@@ -35,15 +35,29 @@ extern "C" {
typedef void (*WKConnectionDidReceiveMessageCallback)(WKConnectionRef connection, WKStringRef messageName, WKTypeRef messageBody, const void *clientInfo);
typedef void (*WKConnectionDidCloseCallback)(WKConnectionRef connection, const void* clientInfo);
struct WKConnectionClient {
typedef struct WKConnectionClientBase {
int version;
const void * clientInfo;
} WKConnectionClientBase;
typedef struct WKConnectionClientV0 {
WKConnectionClientBase base;
// Version 0.
WKConnectionDidReceiveMessageCallback didReceiveMessage;
WKConnectionDidCloseCallback didClose;
};
typedef struct WKConnectionClient WKConnectionClient;
} WKConnectionClientV0;
// FIXME: Deprecate.
enum { WKConnectionClientCurrentVersion = 0 };
typedef struct WKConnectionClient {
int version;
const void * clientInfo;
// Version 0.
WKConnectionDidReceiveMessageCallback didReceiveMessage;
WKConnectionDidCloseCallback didClose;
} WKConnectionClient;
WK_EXPORT WKTypeID WKConnectionGetTypeID();
......
......@@ -42,14 +42,27 @@ typedef uint32_t WKHTTPCookieAcceptPolicy;
// Cookie Manager Client
typedef void (*WKCookieManagerCookiesDidChangeCallback)(WKCookieManagerRef cookieManager, const void *clientInfo);
struct WKCookieManagerClient {
typedef struct WKCookieManagerClientBase {
int version;
const void * clientInfo;
} WKCookieManagerClientBase;
typedef struct WKCookieManagerClientV0 {
WKCookieManagerClientBase base;
// Version 0.
WKCookieManagerCookiesDidChangeCallback cookiesDidChange;
};
typedef struct WKCookieManagerClient WKCookieManagerClient;
} WKCookieManagerClientV0;
// FIXME: Deprecate.
enum { kWKCookieManagerClientCurrentVersion = 0 };
typedef struct WKCookieManagerClient {
int version;
const void * clientInfo;
// Version 0.
WKCookieManagerCookiesDidChangeCallback cookiesDidChange;
} WKCookieManagerClient;
WK_EXPORT WKTypeID WKCookieManagerGetTypeID();
......
......@@ -66,16 +66,29 @@ WK_EXPORT WKStringRef WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey();
typedef void (*WKDatabaseManagerDidModifyOriginCallback)(WKDatabaseManagerRef databaseManager, WKSecurityOriginRef origin, const void *clientInfo);
typedef void (*WKDatabaseManagerDidModifyDatabaseCallback)(WKDatabaseManagerRef databaseManager, WKSecurityOriginRef origin, WKStringRef databaseIdentifier, const void *clientInfo);
struct WKDatabaseManagerClient {
typedef struct WKDatabaseManagerClientBase {
int version;
const void * clientInfo;
} WKDatabaseManagerClientBase;
typedef struct WKDatabaseManagerClientV0 {
WKDatabaseManagerClientBase base;
// Version 0.
WKDatabaseManagerDidModifyOriginCallback didModifyOrigin;
WKDatabaseManagerDidModifyDatabaseCallback didModifyDatabase;
};
typedef struct WKDatabaseManagerClient WKDatabaseManagerClient;
} WKDatabaseManagerClientV0;
// FIXME: Deprecate.
enum { kWKDatabaseManagerClientCurrentVersion = 0 };
typedef struct WKDatabaseManagerClient {
int version;
const void * clientInfo;
// Version 0.
WKDatabaseManagerDidModifyOriginCallback didModifyOrigin;
WKDatabaseManagerDidModifyDatabaseCallback didModifyDatabase;
} WKDatabaseManagerClient;
WK_EXPORT WKTypeID WKDatabaseManagerGetTypeID();
......
......@@ -37,19 +37,42 @@ typedef void (*WKGeolocationProviderStartUpdatingCallback)(WKGeolocationManagerR
typedef void (*WKGeolocationProviderStopUpdatingCallback)(WKGeolocationManagerRef geolocationManager, const void* clientInfo);
typedef void (*WKGeolocationProviderSetEnableHighAccuracyCallback)(WKGeolocationManagerRef geolocationManager, bool enabled, const void* clientInfo);
struct WKGeolocationProvider {
typedef struct WKGeolocationProviderBase {
int version;
const void * clientInfo;
} WKGeolocationProviderBase;
typedef struct WKGeolocationProviderV0 {
WKGeolocationProviderBase base;
// Version 0.
WKGeolocationProviderStartUpdatingCallback startUpdating;
WKGeolocationProviderStopUpdatingCallback stopUpdating;
} WKGeolocationProviderV0;
typedef struct WKGeolocationProviderV1 {
WKGeolocationProviderBase base;
// Version 0.
WKGeolocationProviderStartUpdatingCallback startUpdating;
WKGeolocationProviderStopUpdatingCallback stopUpdating;
// Version 1.
WKGeolocationProviderSetEnableHighAccuracyCallback setEnableHighAccuracy;
} WKGeolocationProviderV1;
};
typedef struct WKGeolocationProvider WKGeolocationProvider;
// FIXME: Deprecate.
enum { kWKGeolocationProviderCurrentVersion = 1 };
typedef struct WKGeolocationProvider {
int version;
const void * clientInfo;
WKGeolocationProviderStartUpdatingCallback startUpdating;
WKGeolocationProviderStopUpdatingCallback stopUpdating;
// Version 1.
WKGeolocationProviderSetEnableHighAccuracyCallback setEnableHighAccuracy;
} WKGeolocationProvider;
WK_EXPORT WKTypeID WKGeolocationManagerGetTypeID();
......
......@@ -37,20 +37,43 @@ typedef void (*WKIconDatabaseDidChangeIconForPageURLCallback)(WKIconDatabaseRef
typedef void (*WKIconDatabaseDidRemoveAllIconsCallback)(WKIconDatabaseRef iconDatabase, const void* clientInfo);
typedef void (*WKIconDatabaseIconDataReadyForPageURLCallback)(WKIconDatabaseRef iconDatabase, WKURLRef pageURL, const void* clientInfo);
struct WKIconDatabaseClient {
typedef struct WKIconDatabaseClientBase {
int version;
const void * clientInfo;
} WKIconDatabaseClientBase;
// Version 0
typedef struct WKIconDatabaseClientV0 {
WKIconDatabaseClientBase base;
// Version 0.
WKIconDatabaseDidChangeIconForPageURLCallback didChangeIconForPageURL;
WKIconDatabaseDidRemoveAllIconsCallback didRemoveAllIcons;
} WKIconDatabaseClientV0;
typedef struct WKIconDatabaseClientV1 {
WKIconDatabaseClientBase base;
// Version 0.
WKIconDatabaseDidChangeIconForPageURLCallback didChangeIconForPageURL;
WKIconDatabaseDidRemoveAllIconsCallback didRemoveAllIcons;
// Version 1
// Version 1.
WKIconDatabaseIconDataReadyForPageURLCallback iconDataReadyForPageURL;
};
typedef struct WKIconDatabaseClient WKIconDatabaseClient;
} WKIconDatabaseClientV1;
// FIXME: Deprecate.
enum { kWKIconDatabaseClientCurrentVersion = 1 };
typedef struct WKIconDatabaseClient {
int version;
const void * clientInfo;
// Version 0.
WKIconDatabaseDidChangeIconForPageURLCallback didChangeIconForPageURL;
WKIconDatabaseDidRemoveAllIconsCallback didRemoveAllIcons;
// Version 1.
WKIconDatabaseIconDataReadyForPageURLCallback iconDataReadyForPageURL;
} WKIconDatabaseClient;
WK_EXPORT WKTypeID WKIconDatabaseGetTypeID();
......
......@@ -40,9 +40,15 @@ typedef void (*WKNotificationProviderRemoveNotificationManagerCallback)(WKNotifi
typedef WKDictionaryRef (*WKNotificationProviderNotificationPermissionsCallback)(const void* clientInfo);
typedef void (*WKNotificationProviderClearNotificationsCallback)(WKArrayRef notificationIDs, const void* clientInfo);
struct WKNotificationProvider {
typedef struct WKNotificationProviderBase {
int version;
const void* clientInfo;
} WKNotificationProviderBase;
typedef struct WKNotificationProviderV0 {
WKNotificationProviderBase base;
// Version 0.
WKNotificationProviderShowCallback show;
WKNotificationProviderCancelCallback cancel;
WKNotificationProviderDidDestroyNotificationCallback didDestroyNotification;
......@@ -50,10 +56,23 @@ struct WKNotificationProvider {
WKNotificationProviderRemoveNotificationManagerCallback removeNotificationManager;
WKNotificationProviderNotificationPermissionsCallback notificationPermissions;
WKNotificationProviderClearNotificationsCallback clearNotifications;
};
typedef struct WKNotificationProvider WKNotificationProvider;
} WKNotificationProviderV0;
// FIXME: Deprecate.
enum { kWKNotificationProviderCurrentVersion = 0 };
typedef struct WKNotificationProvider {
int version;
const void* clientInfo;
// Version 0.
WKNotificationProviderShowCallback show;
WKNotificationProviderCancelCallback cancel;
WKNotificationProviderDidDestroyNotificationCallback didDestroyNotification;
WKNotificationProviderAddNotificationManagerCallback addNotificationManager;
WKNotificationProviderRemoveNotificationManagerCallback removeNotificationManager;
WKNotificationProviderNotificationPermissionsCallback notificationPermissions;
WKNotificationProviderClearNotificationsCallback clearNotifications;
} WKNotificationProvider;
#ifdef __cplusplus
}
......
......@@ -33,7 +33,6 @@
extern "C" {
#endif
// ContextMenu client
typedef void (*WKPageGetContextMenuFromProposedContextMenuCallback)(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKHitTestResultRef hitTestResult, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageCustomContextMenuItemSelectedCallback)(WKPageRef page, WKContextMenuItemRef contextMenuItem, const void* clientInfo);
typedef void (*WKPageContextMenuDismissedCallback)(WKPageRef page, const void* clientInfo);
......@@ -42,27 +41,83 @@ typedef void (*WKPageHideContextMenuCallback)(WKPageRef page, const void* client
// Deprecated
typedef void (*WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0)(WKPageRef page, WKArrayRef proposedMenu, WKArrayRef* newMenu, WKTypeRef userData, const void* clientInfo);
struct WKPageContextMenuClient {
typedef struct WKPageContextMenuClientBase {
int version;
const void * clientInfo;
} WKPageContextMenuClientBase;
typedef struct WKPageContextMenuClientV0 {
WKPageContextMenuClientBase base;
// Version 0.
WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
} WKPageContextMenuClientV0;
typedef struct WKPageContextMenuClientV1 {
WKPageContextMenuClientBase base;
// Version 0.
WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
// Version 1.
WKPageContextMenuDismissedCallback contextMenuDismissed;
} WKPageContextMenuClientV1;
typedef struct WKPageContextMenuClientV2 {
WKPageContextMenuClientBase base;
// Version 0.
WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
// Version 1.
WKPageContextMenuDismissedCallback contextMenuDismissed;
// Version 2.
WKPageGetContextMenuFromProposedContextMenuCallback getContextMenuFromProposedMenu;
} WKPageContextMenuClientV2;
typedef struct WKPageContextMenuClientV3 {
WKPageContextMenuClientBase base;
// Version 0
// Version 0.
WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
// Version 1
// Version 1.
WKPageContextMenuDismissedCallback contextMenuDismissed;
// Version 2
// Version 2.
WKPageGetContextMenuFromProposedContextMenuCallback getContextMenuFromProposedMenu;
// Version 3
// Version 3.
WKPageShowContextMenuCallback showContextMenu;
WKPageHideContextMenuCallback hideContextMenu;
};
typedef struct WKPageContextMenuClient WKPageContextMenuClient;
} WKPageContextMenuClientV3;
// FIXME: Deprecate.
enum { kWKPageContextMenuClientCurrentVersion = 3 };
typedef struct WKPageContextMenuClient {
int version;
const void * clientInfo;
// Version 0.
WKPageGetContextMenuFromProposedContextMenuCallback_deprecatedForUseWithV0 getContextMenuFromProposedMenu_deprecatedForUseWithV0;
WKPageCustomContextMenuItemSelectedCallback customContextMenuItemSelected;
// Version 1.
WKPageContextMenuDismissedCallback contextMenuDismissed;
// Version 2.
WKPageGetContextMenuFromProposedContextMenuCallback getContextMenuFromProposedMenu;
// Version 3.
WKPageShowContextMenuCallback showContextMenu;
WKPageHideContextMenuCallback hideContextMenu;
} WKPageContextMenuClient;
#ifdef __cplusplus
}
......
......@@ -32,21 +32,35 @@
extern "C" {
#endif
// Find client.
typedef void (*WKPageDidFindStringCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
typedef void (*WKPageDidFailToFindStringCallback)(WKPageRef page, WKStringRef string, const void* clientInfo);
typedef void (*WKPageDidCountStringMatchesCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
struct WKPageFindClient {
typedef struct WKPageFindClientBase {
int version;
const void * clientInfo;
} WKPageFindClientBase;
typedef struct WKPageFindClientV0 {
WKPageFindClientBase base;
// Version 0.
WKPageDidFindStringCallback didFindString;
WKPageDidFailToFindStringCallback didFailToFindString;
WKPageDidCountStringMatchesCallback didCountStringMatches;
};
typedef struct WKPageFindClient WKPageFindClient;
} WKPageFindClientV0;
// FIXME: Deprecate.
enum { kWKPageFindClientCurrentVersion = 0 };
typedef struct WKPageFindClient {
int version;
const void * clientInfo;
// Version 0.
WKPageDidFindStringCallback didFindString;
WKPageDidFailToFindStringCallback didFailToFindString;
WKPageDidCountStringMatchesCallback didCountStringMatches;
} WKPageFindClient;
#ifdef __cplusplus
}
......
......@@ -40,15 +40,27 @@ enum {
typedef void (*WKPageDidFindStringMatchesCallback)(WKPageRef page, WKStringRef string, WKArrayRef matches, int firstIndex, const void* clientInfo);
typedef void (*WKPageDidGetImageForMatchResultCallback)(WKPageRef page, WKImageRef image, uint32_t index, const void* clientInfo);
struct WKPageFindMatchesClient {
typedef struct WKPageFindMatchesClientBase {
int version;
const void * clientInfo;
} WKPageFindMatchesClientBase;
typedef struct WKPageFindMatchesClientV0 {
WKPageFindMatchesClientBase base;
// Version 0.
WKPageDidFindStringMatchesCallback didFindStringMatches;
WKPageDidGetImageForMatchResultCallback didGetImageForMatchResult;
};
typedef struct WKPageFindMatchesClient WKPageFindMatchesClient;
} WKPageFindMatchesClientV0;
// FIXME: Deprecate.
enum { kWKPageFindMatchesClientCurrentVersion = 0 };
typedef struct WKPageFindMatchesClient {
int version;
const void * clientInfo;
WKPageDidFindStringMatchesCallback didFindStringMatches;
WKPageDidGetImageForMatchResultCallback didGetImageForMatchResult;
} WKPageFindMatchesClient;
#ifdef __cplusplus
}
......
......@@ -35,14 +35,27 @@ extern "C" {
// Form Client.
typedef void (*WKPageWillSubmitFormCallback)(WKPageRef page, WKFrameRef frame, WKFrameRef sourceFrame, WKDictionaryRef values, WKTypeRef userData, WKFormSubmissionListenerRef listener, const void* clientInfo);
struct WKPageFormClient {
typedef struct WKPageFormClientBase {
int version;
const void * clientInfo;
} WKPageFormClientBase;
typedef struct WKPageFormClientV0 {
WKPageFormClientBase base;
// Version 0.
WKPageWillSubmitFormCallback willSubmitForm;
};
typedef struct WKPageFormClient WKPageFormClient;
} WKPageFormClientV0;
// FIXME: Deprecate.
enum { kWKPageFormClientCurrentVersion = 0 };
typedef struct WKPageFormClient {
int version;
const void * clientInfo;
// Version 0.
WKPageWillSubmitFormCallback willSubmitForm;
} WKPageFormClient;
#ifdef __cplusplus
}
......
......@@ -79,6 +79,8 @@ typedef struct WKPageLoaderClientBase {
typedef struct WKPageLoaderClientV0 {
WKPageLoaderClientBase base;
// Version 0.
WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
......@@ -112,6 +114,8 @@ typedef struct WKPageLoaderClientV0 {
typedef struct WKPageLoaderClientV1 {
WKPageLoaderClientBase base;
// Version -.
WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
......@@ -142,7 +146,7 @@ typedef struct WKPageLoaderClientV1 {
WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
// Version 1
// Version 1.
WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
void* didNewFirstVisuallyNonEmptyLayout_unavailable;
......@@ -155,6 +159,8 @@ typedef struct WKPageLoaderClientV1 {
typedef struct WKPageLoaderClientV2 {
WKPageLoaderClientBase base;
// Version 0.
WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
......@@ -185,7 +191,7 @@ typedef struct WKPageLoaderClientV2 {
WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
// Version 1
// Version 1.
WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
void* didNewFirstVisuallyNonEmptyLayout_unavailable;
......@@ -195,7 +201,7 @@ typedef struct WKPageLoaderClientV2 {
WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
// Version 2
// Version 2.
void (*didReceiveIntentForFrame_unavailable)(void);
void (*registerIntentServiceForFrame_unavailable)(void);
......@@ -206,6 +212,8 @@ typedef struct WKPageLoaderClientV2 {
typedef struct WKPageLoaderClientV3 {
WKPageLoaderClientBase base;
// Version 0.
WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
......@@ -236,7 +244,7 @@ typedef struct WKPageLoaderClientV3 {
WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
// Version 1
// Version 1.
WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
void* didNewFirstVisuallyNonEmptyLayout_unavailable;
......@@ -246,7 +254,7 @@ typedef struct WKPageLoaderClientV3 {
WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
// Version 2
// Version 2.
void (*didReceiveIntentForFrame_unavailable)(void);
void (*registerIntentServiceForFrame_unavailable)(void);
......@@ -254,7 +262,7 @@ typedef struct WKPageLoaderClientV3 {
WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
WKPagePluginDidFailCallback pluginDidFail;
// Version 3
// Version 3.
WKPagePluginLoadPolicyCallback pluginLoadPolicy;
} WKPageLoaderClientV3;
......@@ -263,6 +271,8 @@ enum { kWKPageLoaderClientCurrentVersion = 3 };
typedef struct WKPageLoaderClient {
int version;
const void * clientInfo;
// Version 0.
WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
......@@ -293,7 +303,7 @@ typedef struct WKPageLoaderClient {
WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
// Version 1
// Version 1.
WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
void* didNewFirstVisuallyNonEmptyLayout_unavailable;
......@@ -303,7 +313,7 @@ typedef struct WKPageLoaderClient {
WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
// Version 2
// Version 2.
void (*didReceiveIntentForFrame_unavailable)(void);
void (*registerIntentServiceForFrame_unavailable)(void);
......@@ -311,7 +321,7 @@ typedef struct WKPageLoaderClient {
WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
WKPagePluginDidFailCallback pluginDidFail;
// Version 3
// Version 3.
WKPagePluginLoadPolicyCallback pluginLoadPolicy;
} WKPageLoaderClient;
......
......@@ -34,31 +34,59 @@
extern "C" {
#endif
// Policy Client.
typedef void (*WKPageDecidePolicyForNavigationActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKFrameRef originatingFrame, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageDecidePolicyForNewWindowActionCallback)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKStringRef frameName, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageDecidePolicyForResponseCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageUnableToImplementPolicyCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo);
// Deprecated
typedef void (*WKPageDecidePolicyForNavigationActionCallback_deprecatedForUseWithV0)(WKPageRef page, WKFrameRef frame, WKFrameNavigationType navigationType, WKEventModifiers modifiers, WKEventMouseButton mouseButton, WKURLRequestRef request, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
typedef void (*WKPageDecidePolicyForResponseCallback)(WKPageRef page, WKFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, bool canShowMIMEType, WKFramePolicyListenerRef listener, WKTypeRef userData, const void* clientInfo);
struct WKPagePolicyClient {
typedef struct WKPagePolicyClientBase {
int version;
const void * clientInfo;
} WKPagePolicyClientBase;