|
1 /* |
|
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 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 * |
|
8 * 1. Redistributions of source code must retain the above copyright |
|
9 * notice, this list of conditions and the following disclaimer. |
|
10 * 2. Redistributions in binary form must reproduce the above copyright |
|
11 * notice, this list of conditions and the following disclaimer in the |
|
12 * documentation and/or other materials provided with the distribution. |
|
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of |
|
14 * its contributors may be used to endorse or promote products derived |
|
15 * from this software without specific prior written permission. |
|
16 * |
|
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
|
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
|
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
|
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
|
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 */ |
|
28 |
|
29 // This header contains WebView declarations that can be used anywhere in WebKit, but are neither SPI nor API. |
|
30 |
|
31 #import "WebTypesInternal.h" |
|
32 |
|
33 @class WebView; |
|
34 |
|
35 struct WebResourceDelegateImplementationCache { |
|
36 IMP didCancelAuthenticationChallengeFunc; |
|
37 IMP didReceiveAuthenticationChallengeFunc; |
|
38 #if USE(PROTECTION_SPACE_AUTH_CALLBACK) |
|
39 IMP canAuthenticateAgainstProtectionSpaceFunc; |
|
40 #endif |
|
41 IMP identifierForRequestFunc; |
|
42 IMP willSendRequestFunc; |
|
43 IMP didReceiveResponseFunc; |
|
44 IMP didReceiveContentLengthFunc; |
|
45 IMP didFinishLoadingFromDataSourceFunc; |
|
46 IMP didFailLoadingWithErrorFromDataSourceFunc; |
|
47 IMP didLoadResourceFromMemoryCacheFunc; |
|
48 IMP willCacheResponseFunc; |
|
49 IMP plugInFailedWithErrorFunc; |
|
50 IMP shouldUseCredentialStorageFunc; |
|
51 }; |
|
52 |
|
53 struct WebFrameLoadDelegateImplementationCache { |
|
54 IMP didClearWindowObjectForFrameFunc; |
|
55 IMP didClearWindowObjectForFrameInScriptWorldFunc; |
|
56 IMP didClearInspectorWindowObjectForFrameFunc; |
|
57 IMP windowScriptObjectAvailableFunc; |
|
58 IMP didHandleOnloadEventsForFrameFunc; |
|
59 IMP didReceiveServerRedirectForProvisionalLoadForFrameFunc; |
|
60 IMP didCancelClientRedirectForFrameFunc; |
|
61 IMP willPerformClientRedirectToURLDelayFireDateForFrameFunc; |
|
62 IMP didChangeLocationWithinPageForFrameFunc; |
|
63 IMP didPushStateWithinPageForFrameFunc; |
|
64 IMP didReplaceStateWithinPageForFrameFunc; |
|
65 IMP didPopStateWithinPageForFrameFunc; |
|
66 IMP willCloseFrameFunc; |
|
67 IMP didStartProvisionalLoadForFrameFunc; |
|
68 IMP didReceiveTitleForFrameFunc; |
|
69 IMP didCommitLoadForFrameFunc; |
|
70 IMP didFailProvisionalLoadWithErrorForFrameFunc; |
|
71 IMP didFailLoadWithErrorForFrameFunc; |
|
72 IMP didFinishLoadForFrameFunc; |
|
73 IMP didFirstLayoutInFrameFunc; |
|
74 IMP didFirstVisuallyNonEmptyLayoutInFrameFunc; |
|
75 IMP didReceiveIconForFrameFunc; |
|
76 IMP didFinishDocumentLoadForFrameFunc; |
|
77 IMP didDisplayInsecureContentFunc; |
|
78 IMP didRunInsecureContentFunc; |
|
79 }; |
|
80 |
|
81 struct WebScriptDebugDelegateImplementationCache { |
|
82 BOOL didParseSourceExpectsBaseLineNumber; |
|
83 IMP didParseSourceFunc; |
|
84 IMP failedToParseSourceFunc; |
|
85 IMP didEnterCallFrameFunc; |
|
86 IMP willExecuteStatementFunc; |
|
87 IMP willLeaveCallFrameFunc; |
|
88 IMP exceptionWasRaisedFunc; |
|
89 }; |
|
90 |
|
91 struct WebHistoryDelegateImplementationCache { |
|
92 IMP navigatedFunc; |
|
93 IMP clientRedirectFunc; |
|
94 IMP serverRedirectFunc; |
|
95 IMP setTitleFunc; |
|
96 IMP populateVisitedLinksFunc; |
|
97 }; |
|
98 |
|
99 WebResourceDelegateImplementationCache* WebViewGetResourceLoadDelegateImplementations(WebView *); |
|
100 WebFrameLoadDelegateImplementationCache* WebViewGetFrameLoadDelegateImplementations(WebView *); |
|
101 WebScriptDebugDelegateImplementationCache* WebViewGetScriptDebugDelegateImplementations(WebView *); |
|
102 WebHistoryDelegateImplementationCache* WebViewGetHistoryDelegateImplementations(WebView *webView); |
|
103 |
|
104 id CallFormDelegate(WebView *, SEL, id, id); |
|
105 id CallFormDelegate(WebView *self, SEL selector, id object1, id object2, id object3, id object4, id object5); |
|
106 BOOL CallFormDelegateReturningBoolean(BOOL, WebView *, SEL, id, SEL, id); |
|
107 |
|
108 id CallUIDelegate(WebView *, SEL); |
|
109 id CallUIDelegate(WebView *, SEL, id); |
|
110 id CallUIDelegate(WebView *, SEL, NSRect); |
|
111 id CallUIDelegate(WebView *, SEL, id, id); |
|
112 id CallUIDelegate(WebView *, SEL, id, BOOL); |
|
113 id CallUIDelegate(WebView *, SEL, id, id, id); |
|
114 id CallUIDelegate(WebView *, SEL, id, NSUInteger); |
|
115 float CallUIDelegateReturningFloat(WebView *, SEL); |
|
116 BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL); |
|
117 BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id); |
|
118 BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, id); |
|
119 BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, BOOL); |
|
120 BOOL CallUIDelegateReturningBoolean(BOOL, WebView *, SEL, id, BOOL, id); |
|
121 |
|
122 id CallFrameLoadDelegate(IMP, WebView *, SEL); |
|
123 id CallFrameLoadDelegate(IMP, WebView *, SEL, id); |
|
124 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id); |
|
125 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id); |
|
126 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, id, id, id); |
|
127 id CallFrameLoadDelegate(IMP, WebView *, SEL, id, NSTimeInterval, id, id); |
|
128 |
|
129 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id); |
|
130 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id); |
|
131 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, id, id); |
|
132 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, NSInteger, id); |
|
133 id CallResourceLoadDelegate(IMP, WebView *, SEL, id, id, NSInteger, id); |
|
134 |
|
135 BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id); |
|
136 BOOL CallResourceLoadDelegateReturningBoolean(BOOL, IMP, WebView *, SEL, id, id, id); |
|
137 |
|
138 id CallScriptDebugDelegate(IMP, WebView *, SEL, id, id, NSInteger, id); |
|
139 id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, NSInteger, id); |
|
140 id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, id, id, id); |
|
141 id CallScriptDebugDelegate(IMP, WebView *, SEL, id, NSInteger, NSInteger, id); |
|
142 |
|
143 id CallHistoryDelegate(IMP, WebView *, SEL); |
|
144 id CallHistoryDelegate(IMP, WebView *, SEL, id, id); |
|
145 id CallHistoryDelegate(IMP, WebView *, SEL, id, id, id); |