| 1 | /* |
| 2 | * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #ifndef WKPageLoaderClient_h |
| 27 | #define WKPageLoaderClient_h |
| 28 | |
| 29 | #include <WebKit/WKBase.h> |
| 30 | #include <WebKit/WKErrorRef.h> |
| 31 | #include <WebKit/WKPageLoadTypes.h> |
| 32 | #include <WebKit/WKPluginLoadPolicy.h> |
| 33 | |
| 34 | #ifdef __cplusplus |
| 35 | extern "C" { |
| 36 | #endif |
| 37 | |
| 38 | enum { |
| 39 | kWKWebGLLoadPolicyBlocked = 0, |
| 40 | kWKWebGLLoadPolicyLoadNormally, |
| 41 | kWKWebGLLoadPolicyPending |
| 42 | }; |
| 43 | typedef uint32_t WKWebGLLoadPolicy; |
| 44 | |
| 45 | typedef void (*WKPageLoaderClientCallback)(WKPageRef page, const void* clientInfo); |
| 46 | typedef void (*WKPageDidStartProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 47 | typedef void (*WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 48 | typedef void (*WKPageDidFailProvisionalLoadWithErrorForFrameCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void *clientInfo); |
| 49 | typedef void (*WKPageDidCommitLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 50 | typedef void (*WKPageDidFinishDocumentLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 51 | typedef void (*WKPageDidFinishLoadForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 52 | typedef void (*WKPageDidFailLoadWithErrorForFrameCallback)(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void *clientInfo); |
| 53 | typedef void (*WKPageDidSameDocumentNavigationForFrameCallback)(WKPageRef page, WKFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef userData, const void *clientInfo); |
| 54 | typedef void (*WKPageDidReceiveTitleForFrameCallback)(WKPageRef page, WKStringRef title, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 55 | typedef void (*WKPageDidFirstLayoutForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 56 | typedef void (*WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 57 | typedef void (*WKPageDidRemoveFrameFromHierarchyCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 58 | typedef void (*WKPageDidDisplayInsecureContentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 59 | typedef void (*WKPageDidRunInsecureContentForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 60 | typedef void (*WKPageDidDetectXSSForFrameCallback)(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo); |
| 61 | typedef bool (*WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback)(WKPageRef page, WKFrameRef frame, WKProtectionSpaceRef protectionSpace, const void *clientInfo); |
| 62 | typedef void (*WKPageDidReceiveAuthenticationChallengeInFrameCallback)(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo); |
| 63 | typedef void (*WKPageDidChangeBackForwardListCallback)(WKPageRef page, WKBackForwardListItemRef addedItem, WKArrayRef removedItems, const void *clientInfo); |
| 64 | typedef bool (*WKPageShouldGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, const void *clientInfo); |
| 65 | typedef bool (*WKPageShouldKeepCurrentBackForwardListItemInListCallback)(WKPageRef page, WKBackForwardListItemRef item, const void *clientInfo); |
| 66 | typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo); |
| 67 | typedef void (*WKPageDidLayoutCallback)(WKPageRef page, WKLayoutMilestones milestones, WKTypeRef userData, const void *clientInfo); |
| 68 | typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo); |
| 69 | typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, uint32_t errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo); |
| 70 | typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef url, const void* clientInfo); |
| 71 | typedef void (*WKPageNavigationGestureDidBeginCallback)(WKPageRef page, const void* clientInfo); |
| 72 | typedef void (*WKPageNavigationGestureWillEndCallback)(WKPageRef page, bool willNavigate, WKBackForwardListItemRef item, const void* clientInfo); |
| 73 | typedef void (*WKPageNavigationGestureDidEndCallback)(WKPageRef page, bool willNavigate, WKBackForwardListItemRef item, const void* clientInfo); |
| 74 | |
| 75 | // Deprecated |
| 76 | typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo); |
| 77 | typedef void (*WKPagePluginDidFailCallback_deprecatedForUseWithV1)(WKPageRef page, uint32_t errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo); |
| 78 | typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, const void* clientInfo); |
| 79 | |
| 80 | typedef struct WKPageLoaderClientBase { |
| 81 | int version; |
| 82 | const void * clientInfo; |
| 83 | } WKPageLoaderClientBase; |
| 84 | |
| 85 | typedef struct WKPageLoaderClientV0 { |
| 86 | WKPageLoaderClientBase base; |
| 87 | |
| 88 | // Version 0. |
| 89 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 90 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 91 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 92 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 93 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 94 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 95 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 96 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 97 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 98 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 99 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 100 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 101 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 102 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 103 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 104 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 105 | |
| 106 | // FIXME: Move to progress client. |
| 107 | WKPageLoaderClientCallback didStartProgress; |
| 108 | WKPageLoaderClientCallback didChangeProgress; |
| 109 | WKPageLoaderClientCallback didFinishProgress; |
| 110 | |
| 111 | // FIXME: These three functions should not be part of this client. |
| 112 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 113 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 114 | WKPageLoaderClientCallback processDidCrash; |
| 115 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 116 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 117 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 118 | } WKPageLoaderClientV0; |
| 119 | |
| 120 | typedef struct WKPageLoaderClientV1 { |
| 121 | WKPageLoaderClientBase base; |
| 122 | |
| 123 | // Version -. |
| 124 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 125 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 126 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 127 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 128 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 129 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 130 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 131 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 132 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 133 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 134 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 135 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 136 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 137 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 138 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 139 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 140 | |
| 141 | // FIXME: Move to progress client. |
| 142 | WKPageLoaderClientCallback didStartProgress; |
| 143 | WKPageLoaderClientCallback didChangeProgress; |
| 144 | WKPageLoaderClientCallback didFinishProgress; |
| 145 | |
| 146 | // FIXME: These three functions should not be part of this client. |
| 147 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 148 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 149 | WKPageLoaderClientCallback processDidCrash; |
| 150 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 151 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 152 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 153 | |
| 154 | // Version 1. |
| 155 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 156 | |
| 157 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 158 | |
| 159 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 160 | |
| 161 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 162 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 163 | } WKPageLoaderClientV1; |
| 164 | |
| 165 | typedef struct WKPageLoaderClientV2 { |
| 166 | WKPageLoaderClientBase base; |
| 167 | |
| 168 | // Version 0. |
| 169 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 170 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 171 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 172 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 173 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 174 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 175 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 176 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 177 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 178 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 179 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 180 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 181 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 182 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 183 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 184 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 185 | |
| 186 | // FIXME: Move to progress client. |
| 187 | WKPageLoaderClientCallback didStartProgress; |
| 188 | WKPageLoaderClientCallback didChangeProgress; |
| 189 | WKPageLoaderClientCallback didFinishProgress; |
| 190 | |
| 191 | // FIXME: These three functions should not be part of this client. |
| 192 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 193 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 194 | WKPageLoaderClientCallback processDidCrash; |
| 195 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 196 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 197 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 198 | |
| 199 | // Version 1. |
| 200 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 201 | |
| 202 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 203 | |
| 204 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 205 | |
| 206 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 207 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 208 | |
| 209 | // Version 2. |
| 210 | void (*didReceiveIntentForFrame_unavailable)(void); |
| 211 | void (*registerIntentServiceForFrame_unavailable)(void); |
| 212 | |
| 213 | WKPageDidLayoutCallback didLayout; |
| 214 | WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2; |
| 215 | WKPagePluginDidFailCallback pluginDidFail; |
| 216 | } WKPageLoaderClientV2; |
| 217 | |
| 218 | typedef struct WKPageLoaderClientV3 { |
| 219 | WKPageLoaderClientBase base; |
| 220 | |
| 221 | // Version 0. |
| 222 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 223 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 224 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 225 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 226 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 227 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 228 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 229 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 230 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 231 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 232 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 233 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 234 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 235 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 236 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 237 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 238 | |
| 239 | // FIXME: Move to progress client. |
| 240 | WKPageLoaderClientCallback didStartProgress; |
| 241 | WKPageLoaderClientCallback didChangeProgress; |
| 242 | WKPageLoaderClientCallback didFinishProgress; |
| 243 | |
| 244 | // FIXME: These three functions should not be part of this client. |
| 245 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 246 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 247 | WKPageLoaderClientCallback processDidCrash; |
| 248 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 249 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 250 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 251 | |
| 252 | // Version 1. |
| 253 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 254 | |
| 255 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 256 | |
| 257 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 258 | |
| 259 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 260 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 261 | |
| 262 | // Version 2. |
| 263 | void (*didReceiveIntentForFrame_unavailable)(void); |
| 264 | void (*registerIntentServiceForFrame_unavailable)(void); |
| 265 | |
| 266 | WKPageDidLayoutCallback didLayout; |
| 267 | WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2; |
| 268 | WKPagePluginDidFailCallback pluginDidFail; |
| 269 | |
| 270 | // Version 3. |
| 271 | WKPagePluginLoadPolicyCallback pluginLoadPolicy; |
| 272 | } WKPageLoaderClientV3; |
| 273 | |
| 274 | typedef struct WKPageLoaderClientV4 { |
| 275 | WKPageLoaderClientBase base; |
| 276 | |
| 277 | // Version 0. |
| 278 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 279 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 280 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 281 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 282 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 283 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 284 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 285 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 286 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 287 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 288 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 289 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 290 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 291 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 292 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 293 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 294 | |
| 295 | // FIXME: Move to progress client. |
| 296 | WKPageLoaderClientCallback didStartProgress; |
| 297 | WKPageLoaderClientCallback didChangeProgress; |
| 298 | WKPageLoaderClientCallback didFinishProgress; |
| 299 | |
| 300 | // FIXME: These three functions should not be part of this client. |
| 301 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 302 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 303 | WKPageLoaderClientCallback processDidCrash; |
| 304 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 305 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 306 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 307 | |
| 308 | // Version 1. |
| 309 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 310 | |
| 311 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 312 | |
| 313 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 314 | |
| 315 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 316 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 317 | |
| 318 | // Version 2. |
| 319 | void (*didReceiveIntentForFrame_unavailable)(void); |
| 320 | void (*registerIntentServiceForFrame_unavailable)(void); |
| 321 | |
| 322 | WKPageDidLayoutCallback didLayout; |
| 323 | WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2; |
| 324 | WKPagePluginDidFailCallback pluginDidFail; |
| 325 | |
| 326 | // Version 3. |
| 327 | WKPagePluginLoadPolicyCallback pluginLoadPolicy; |
| 328 | |
| 329 | // Version 4 |
| 330 | WKPageWebGLLoadPolicyCallback webGLLoadPolicy; |
| 331 | WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy; |
| 332 | } WKPageLoaderClientV4; |
| 333 | |
| 334 | typedef struct WKPageLoaderClientV5 { |
| 335 | WKPageLoaderClientBase base; |
| 336 | |
| 337 | // Version 0. |
| 338 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 339 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 340 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 341 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 342 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 343 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 344 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 345 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 346 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 347 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 348 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 349 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 350 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 351 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 352 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 353 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 354 | |
| 355 | // FIXME: Move to progress client. |
| 356 | WKPageLoaderClientCallback didStartProgress; |
| 357 | WKPageLoaderClientCallback didChangeProgress; |
| 358 | WKPageLoaderClientCallback didFinishProgress; |
| 359 | |
| 360 | // FIXME: These three functions should not be part of this client. |
| 361 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 362 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 363 | WKPageLoaderClientCallback processDidCrash; |
| 364 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 365 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 366 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 367 | |
| 368 | // Version 1. |
| 369 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 370 | |
| 371 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 372 | |
| 373 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 374 | |
| 375 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 376 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 377 | |
| 378 | // Version 2. |
| 379 | void (*didReceiveIntentForFrame_unavailable)(void); |
| 380 | void (*registerIntentServiceForFrame_unavailable)(void); |
| 381 | |
| 382 | WKPageDidLayoutCallback didLayout; |
| 383 | WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2; |
| 384 | WKPagePluginDidFailCallback pluginDidFail; |
| 385 | |
| 386 | // Version 3. |
| 387 | WKPagePluginLoadPolicyCallback pluginLoadPolicy; |
| 388 | |
| 389 | // Version 4. |
| 390 | WKPageWebGLLoadPolicyCallback webGLLoadPolicy; |
| 391 | WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy; |
| 392 | |
| 393 | // Version 5. |
| 394 | WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList; |
| 395 | } WKPageLoaderClientV5; |
| 396 | |
| 397 | typedef struct WKPageLoaderClientV6 { |
| 398 | WKPageLoaderClientBase base; |
| 399 | |
| 400 | // Version 0. |
| 401 | WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; |
| 402 | WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; |
| 403 | WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; |
| 404 | WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame; |
| 405 | WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; |
| 406 | WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame; |
| 407 | WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; |
| 408 | WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; |
| 409 | WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; |
| 410 | WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; |
| 411 | WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; |
| 412 | WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; |
| 413 | WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; |
| 414 | WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; |
| 415 | WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame; |
| 416 | WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame; |
| 417 | |
| 418 | // FIXME: Move to progress client. |
| 419 | WKPageLoaderClientCallback didStartProgress; |
| 420 | WKPageLoaderClientCallback didChangeProgress; |
| 421 | WKPageLoaderClientCallback didFinishProgress; |
| 422 | |
| 423 | // FIXME: These three functions should not be part of this client. |
| 424 | WKPageLoaderClientCallback processDidBecomeUnresponsive; |
| 425 | WKPageLoaderClientCallback processDidBecomeResponsive; |
| 426 | WKPageLoaderClientCallback processDidCrash; |
| 427 | WKPageDidChangeBackForwardListCallback didChangeBackForwardList; |
| 428 | WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; |
| 429 | WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0; |
| 430 | |
| 431 | // Version 1. |
| 432 | WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame; |
| 433 | |
| 434 | void* didNewFirstVisuallyNonEmptyLayout_unavailable; |
| 435 | |
| 436 | WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem; |
| 437 | |
| 438 | WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive; |
| 439 | WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1; |
| 440 | |
| 441 | // Version 2. |
| 442 | void (*didReceiveIntentForFrame_unavailable)(void); |
| 443 | void (*registerIntentServiceForFrame_unavailable)(void); |
| 444 | |
| 445 | WKPageDidLayoutCallback didLayout; |
| 446 | WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2; |
| 447 | WKPagePluginDidFailCallback pluginDidFail; |
| 448 | |
| 449 | // Version 3. |
| 450 | WKPagePluginLoadPolicyCallback pluginLoadPolicy; |
| 451 | |
| 452 | // Version 4. |
| 453 | WKPageWebGLLoadPolicyCallback webGLLoadPolicy; |
| 454 | WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy; |
| 455 | |
| 456 | // Version 5. |
| 457 | WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList; |
| 458 | |
| 459 | // Version 6. |
| 460 | WKPageNavigationGestureDidBeginCallback navigationGestureDidBegin; |
| 461 | WKPageNavigationGestureWillEndCallback navigationGestureWillEnd; |
| 462 | WKPageNavigationGestureDidEndCallback navigationGestureDidEnd; |
| 463 | } WKPageLoaderClientV6; |
| 464 | |
| 465 | #ifdef __cplusplus |
| 466 | } |
| 467 | #endif |
| 468 | |
| 469 | #endif // WKPageLoaderClient_h |
| 470 | |