2 * Copyright (C) 2013 Apple Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
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.
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.
26 #ifndef WKPageLoaderClient_h
27 #define WKPageLoaderClient_h
29 #include <WebKit/WKBase.h>
30 #include <WebKit/WKErrorRef.h>
31 #include <WebKit/WKPageLoadTypes.h>
32 #include <WebKit/WKPluginLoadPolicy.h>
39 kWKWebGLLoadPolicyBlocked = 0,
40 kWKWebGLLoadPolicyLoadNormally,
41 kWKWebGLLoadPolicyPending
43 typedef uint32_t WKWebGLLoadPolicy;
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);
73 typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
74 typedef void (*WKPagePluginDidFailCallback_deprecatedForUseWithV1)(WKPageRef page, uint32_t errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
75 typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
77 typedef struct WKPageLoaderClientBase {
79 const void * clientInfo;
80 } WKPageLoaderClientBase;
82 typedef struct WKPageLoaderClientV0 {
83 WKPageLoaderClientBase base;
86 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
87 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
88 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
89 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
90 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
91 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
92 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
93 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
94 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
95 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
96 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
97 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
98 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
99 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
100 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
101 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
103 // FIXME: Move to progress client.
104 WKPageLoaderClientCallback didStartProgress;
105 WKPageLoaderClientCallback didChangeProgress;
106 WKPageLoaderClientCallback didFinishProgress;
108 // FIXME: These three functions should not be part of this client.
109 WKPageLoaderClientCallback processDidBecomeUnresponsive;
110 WKPageLoaderClientCallback processDidBecomeResponsive;
111 WKPageLoaderClientCallback processDidCrash;
112 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
113 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
114 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
115 } WKPageLoaderClientV0;
117 typedef struct WKPageLoaderClientV1 {
118 WKPageLoaderClientBase base;
121 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
122 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
123 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
124 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
125 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
126 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
127 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
128 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
129 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
130 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
131 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
132 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
133 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
134 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
135 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
136 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
138 // FIXME: Move to progress client.
139 WKPageLoaderClientCallback didStartProgress;
140 WKPageLoaderClientCallback didChangeProgress;
141 WKPageLoaderClientCallback didFinishProgress;
143 // FIXME: These three functions should not be part of this client.
144 WKPageLoaderClientCallback processDidBecomeUnresponsive;
145 WKPageLoaderClientCallback processDidBecomeResponsive;
146 WKPageLoaderClientCallback processDidCrash;
147 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
148 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
149 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
152 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
154 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
156 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
158 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
159 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
160 } WKPageLoaderClientV1;
162 typedef struct WKPageLoaderClientV2 {
163 WKPageLoaderClientBase base;
166 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
167 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
168 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
169 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
170 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
171 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
172 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
173 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
174 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
175 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
176 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
177 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
178 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
179 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
180 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
181 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
183 // FIXME: Move to progress client.
184 WKPageLoaderClientCallback didStartProgress;
185 WKPageLoaderClientCallback didChangeProgress;
186 WKPageLoaderClientCallback didFinishProgress;
188 // FIXME: These three functions should not be part of this client.
189 WKPageLoaderClientCallback processDidBecomeUnresponsive;
190 WKPageLoaderClientCallback processDidBecomeResponsive;
191 WKPageLoaderClientCallback processDidCrash;
192 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
193 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
194 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
197 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
199 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
201 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
203 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
204 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
207 void (*didReceiveIntentForFrame_unavailable)(void);
208 void (*registerIntentServiceForFrame_unavailable)(void);
210 WKPageDidLayoutCallback didLayout;
211 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
212 WKPagePluginDidFailCallback pluginDidFail;
213 } WKPageLoaderClientV2;
215 typedef struct WKPageLoaderClientV3 {
216 WKPageLoaderClientBase base;
219 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
220 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
221 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
222 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
223 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
224 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
225 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
226 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
227 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
228 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
229 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
230 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
231 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
232 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
233 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
234 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
236 // FIXME: Move to progress client.
237 WKPageLoaderClientCallback didStartProgress;
238 WKPageLoaderClientCallback didChangeProgress;
239 WKPageLoaderClientCallback didFinishProgress;
241 // FIXME: These three functions should not be part of this client.
242 WKPageLoaderClientCallback processDidBecomeUnresponsive;
243 WKPageLoaderClientCallback processDidBecomeResponsive;
244 WKPageLoaderClientCallback processDidCrash;
245 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
246 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
247 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
250 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
252 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
254 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
256 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
257 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
260 void (*didReceiveIntentForFrame_unavailable)(void);
261 void (*registerIntentServiceForFrame_unavailable)(void);
263 WKPageDidLayoutCallback didLayout;
264 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
265 WKPagePluginDidFailCallback pluginDidFail;
268 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
269 } WKPageLoaderClientV3;
271 typedef struct WKPageLoaderClientV4 {
272 WKPageLoaderClientBase base;
275 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
276 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
277 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
278 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
279 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
280 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
281 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
282 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
283 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
284 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
285 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
286 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
287 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
288 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
289 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
290 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
292 // FIXME: Move to progress client.
293 WKPageLoaderClientCallback didStartProgress;
294 WKPageLoaderClientCallback didChangeProgress;
295 WKPageLoaderClientCallback didFinishProgress;
297 // FIXME: These three functions should not be part of this client.
298 WKPageLoaderClientCallback processDidBecomeUnresponsive;
299 WKPageLoaderClientCallback processDidBecomeResponsive;
300 WKPageLoaderClientCallback processDidCrash;
301 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
302 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
303 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
306 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
308 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
310 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
312 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
313 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
316 void (*didReceiveIntentForFrame_unavailable)(void);
317 void (*registerIntentServiceForFrame_unavailable)(void);
319 WKPageDidLayoutCallback didLayout;
320 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
321 WKPagePluginDidFailCallback pluginDidFail;
324 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
327 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
328 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
329 } WKPageLoaderClientV4;
331 typedef struct WKPageLoaderClientV5 {
332 WKPageLoaderClientBase base;
335 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
336 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
337 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
338 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
339 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
340 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
341 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
342 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
343 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
344 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
345 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
346 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
347 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
348 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
349 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
350 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
352 // FIXME: Move to progress client.
353 WKPageLoaderClientCallback didStartProgress;
354 WKPageLoaderClientCallback didChangeProgress;
355 WKPageLoaderClientCallback didFinishProgress;
357 // FIXME: These three functions should not be part of this client.
358 WKPageLoaderClientCallback processDidBecomeUnresponsive;
359 WKPageLoaderClientCallback processDidBecomeResponsive;
360 WKPageLoaderClientCallback processDidCrash;
361 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
362 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
363 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
366 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
368 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
370 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
372 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
373 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
376 void (*didReceiveIntentForFrame_unavailable)(void);
377 void (*registerIntentServiceForFrame_unavailable)(void);
379 WKPageDidLayoutCallback didLayout;
380 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
381 WKPagePluginDidFailCallback pluginDidFail;
384 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
387 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
388 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
391 WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList;
392 } WKPageLoaderClientV5;
394 // FIXME: These should be deprecated.
395 enum { kWKPageLoaderClientCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 3 };
396 typedef struct WKPageLoaderClient {
398 const void * clientInfo;
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;
418 // FIXME: Move to progress client.
419 WKPageLoaderClientCallback didStartProgress;
420 WKPageLoaderClientCallback didChangeProgress;
421 WKPageLoaderClientCallback didFinishProgress;
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;
432 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
434 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
436 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
438 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
439 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
442 void (*didReceiveIntentForFrame_unavailable)(void);
443 void (*registerIntentServiceForFrame_unavailable)(void);
445 WKPageDidLayoutCallback didLayout;
446 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
447 WKPagePluginDidFailCallback pluginDidFail;
450 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
451 } WKPageLoaderClient;
457 #endif // WKPageLoaderClient_h