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);
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);
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);
80 typedef struct WKPageLoaderClientBase {
82 const void * clientInfo;
83 } WKPageLoaderClientBase;
85 typedef struct WKPageLoaderClientV0 {
86 WKPageLoaderClientBase base;
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;
106 // FIXME: Move to progress client.
107 WKPageLoaderClientCallback didStartProgress;
108 WKPageLoaderClientCallback didChangeProgress;
109 WKPageLoaderClientCallback didFinishProgress;
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;
120 typedef struct WKPageLoaderClientV1 {
121 WKPageLoaderClientBase base;
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;
141 // FIXME: Move to progress client.
142 WKPageLoaderClientCallback didStartProgress;
143 WKPageLoaderClientCallback didChangeProgress;
144 WKPageLoaderClientCallback didFinishProgress;
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;
155 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
157 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
159 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
161 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
162 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
163 } WKPageLoaderClientV1;
165 typedef struct WKPageLoaderClientV2 {
166 WKPageLoaderClientBase base;
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;
186 // FIXME: Move to progress client.
187 WKPageLoaderClientCallback didStartProgress;
188 WKPageLoaderClientCallback didChangeProgress;
189 WKPageLoaderClientCallback didFinishProgress;
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;
200 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
202 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
204 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
206 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
207 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
210 void (*didReceiveIntentForFrame_unavailable)(void);
211 void (*registerIntentServiceForFrame_unavailable)(void);
213 WKPageDidLayoutCallback didLayout;
214 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
215 WKPagePluginDidFailCallback pluginDidFail;
216 } WKPageLoaderClientV2;
218 typedef struct WKPageLoaderClientV3 {
219 WKPageLoaderClientBase base;
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;
239 // FIXME: Move to progress client.
240 WKPageLoaderClientCallback didStartProgress;
241 WKPageLoaderClientCallback didChangeProgress;
242 WKPageLoaderClientCallback didFinishProgress;
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;
253 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
255 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
257 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
259 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
260 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
263 void (*didReceiveIntentForFrame_unavailable)(void);
264 void (*registerIntentServiceForFrame_unavailable)(void);
266 WKPageDidLayoutCallback didLayout;
267 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
268 WKPagePluginDidFailCallback pluginDidFail;
271 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
272 } WKPageLoaderClientV3;
274 typedef struct WKPageLoaderClientV4 {
275 WKPageLoaderClientBase base;
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;
295 // FIXME: Move to progress client.
296 WKPageLoaderClientCallback didStartProgress;
297 WKPageLoaderClientCallback didChangeProgress;
298 WKPageLoaderClientCallback didFinishProgress;
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;
309 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
311 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
313 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
315 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
316 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
319 void (*didReceiveIntentForFrame_unavailable)(void);
320 void (*registerIntentServiceForFrame_unavailable)(void);
322 WKPageDidLayoutCallback didLayout;
323 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
324 WKPagePluginDidFailCallback pluginDidFail;
327 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
330 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
331 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
332 } WKPageLoaderClientV4;
334 typedef struct WKPageLoaderClientV5 {
335 WKPageLoaderClientBase base;
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;
355 // FIXME: Move to progress client.
356 WKPageLoaderClientCallback didStartProgress;
357 WKPageLoaderClientCallback didChangeProgress;
358 WKPageLoaderClientCallback didFinishProgress;
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;
369 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
371 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
373 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
375 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
376 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
379 void (*didReceiveIntentForFrame_unavailable)(void);
380 void (*registerIntentServiceForFrame_unavailable)(void);
382 WKPageDidLayoutCallback didLayout;
383 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
384 WKPagePluginDidFailCallback pluginDidFail;
387 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
390 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
391 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
394 WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList;
395 } WKPageLoaderClientV5;
397 typedef struct WKPageLoaderClientV6 {
398 WKPageLoaderClientBase base;
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;
453 WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
454 WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
457 WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList;
460 WKPageNavigationGestureDidBeginCallback navigationGestureDidBegin;
461 WKPageNavigationGestureWillEndCallback navigationGestureWillEnd;
462 WKPageNavigationGestureDidEndCallback navigationGestureDidEnd;
463 } WKPageLoaderClientV6;
465 // FIXME: These should be deprecated.
466 enum { kWKPageLoaderClientCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 3 };
467 typedef struct WKPageLoaderClient {
469 const void * clientInfo;
472 WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
473 WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
474 WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
475 WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
476 WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
477 WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
478 WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
479 WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
480 WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
481 WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
482 WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
483 WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
484 WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
485 WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
486 WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
487 WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
489 // FIXME: Move to progress client.
490 WKPageLoaderClientCallback didStartProgress;
491 WKPageLoaderClientCallback didChangeProgress;
492 WKPageLoaderClientCallback didFinishProgress;
494 // FIXME: These three functions should not be part of this client.
495 WKPageLoaderClientCallback processDidBecomeUnresponsive;
496 WKPageLoaderClientCallback processDidBecomeResponsive;
497 WKPageLoaderClientCallback processDidCrash;
498 WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
499 WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
500 WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
503 WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
505 void* didNewFirstVisuallyNonEmptyLayout_unavailable;
507 WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
509 WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
510 WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
513 void (*didReceiveIntentForFrame_unavailable)(void);
514 void (*registerIntentServiceForFrame_unavailable)(void);
516 WKPageDidLayoutCallback didLayout;
517 WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
518 WKPagePluginDidFailCallback pluginDidFail;
521 WKPagePluginLoadPolicyCallback pluginLoadPolicy;
522 } WKPageLoaderClient;
528 #endif // WKPageLoaderClient_h