|
1 /* |
|
2 * Copyright (C) 2006, 2007 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 #ifndef BaseDelegate_H |
|
30 #define BaseDelegate_H |
|
31 |
|
32 #include <WebKit/IWebFrameLoadDelegate.h> |
|
33 #include <WebKit/IWebNotificationObserver.h> |
|
34 #include <WebKit/IWebUIDelegate.h> |
|
35 |
|
36 struct IDataObject; |
|
37 struct IPropertyBag; |
|
38 struct IWebView; |
|
39 struct IWebFrame; |
|
40 struct IWebError; |
|
41 struct IWebURLRequest; |
|
42 struct IWebOpenPanelResultListener; |
|
43 |
|
44 class BaseDelegate : public IWebFrameLoadDelegate, public IWebUIDelegate { |
|
45 public: |
|
46 // IUnknown |
|
47 virtual HRESULT STDMETHODCALLTYPE QueryInterface( |
|
48 /* [in] */ REFIID, |
|
49 /* [retval][out] */ void**) |
|
50 { return E_NOTIMPL; }; |
|
51 |
|
52 // IWebFrameLoadDelegate |
|
53 virtual HRESULT STDMETHODCALLTYPE didFinishLoadForFrame( |
|
54 /* [in] */ IWebView*, |
|
55 /* [in] */ IWebFrame*) { return E_NOTIMPL; }; |
|
56 |
|
57 virtual HRESULT STDMETHODCALLTYPE windowScriptObjectAvailable( |
|
58 /* [in] */ IWebView*, |
|
59 /* [in] */ JSContextRef, |
|
60 /* [in] */ JSObjectRef) { return E_NOTIMPL; }; |
|
61 |
|
62 virtual HRESULT STDMETHODCALLTYPE didStartProvisionalLoadForFrame( |
|
63 /* [in] */ IWebView*, |
|
64 /* [in] */ IWebFrame*) { return E_NOTIMPL; }; |
|
65 |
|
66 virtual HRESULT STDMETHODCALLTYPE didReceiveServerRedirectForProvisionalLoadForFrame( |
|
67 /* [in] */ IWebView*, |
|
68 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
69 |
|
70 virtual HRESULT STDMETHODCALLTYPE didFailProvisionalLoadWithError( |
|
71 /* [in] */ IWebView*, |
|
72 /* [in] */ IWebError*, |
|
73 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
74 |
|
75 virtual HRESULT STDMETHODCALLTYPE didCommitLoadForFrame( |
|
76 /* [in] */ IWebView*, |
|
77 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
78 |
|
79 virtual HRESULT STDMETHODCALLTYPE didReceiveTitle( |
|
80 /* [in] */ IWebView*, |
|
81 /* [in] */ BSTR, |
|
82 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
83 |
|
84 virtual HRESULT STDMETHODCALLTYPE didReceiveIcon( |
|
85 /* [in] */ IWebView*, |
|
86 /* [in] */ OLE_HANDLE, |
|
87 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
88 |
|
89 virtual HRESULT STDMETHODCALLTYPE didFailLoadWithError( |
|
90 /* [in] */ IWebView*, |
|
91 /* [in] */ IWebError*, |
|
92 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
93 |
|
94 virtual HRESULT STDMETHODCALLTYPE didChangeLocationWithinPageForFrame( |
|
95 /* [in] */ IWebView*, |
|
96 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
97 |
|
98 virtual HRESULT STDMETHODCALLTYPE willPerformClientRedirectToURL( |
|
99 /* [in] */ IWebView*, |
|
100 /* [in] */ BSTR, |
|
101 /* [in] */ double /*delaySeconds*/, |
|
102 /* [in] */ DATE, |
|
103 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
104 |
|
105 virtual HRESULT STDMETHODCALLTYPE didCancelClientRedirectForFrame( |
|
106 /* [in] */ IWebView*, |
|
107 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
108 |
|
109 virtual HRESULT STDMETHODCALLTYPE willCloseFrame( |
|
110 /* [in] */ IWebView*, |
|
111 /* [in] */ IWebFrame*) { return E_NOTIMPL; } |
|
112 |
|
113 // IWebUIDelegate |
|
114 virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest( |
|
115 /* [in] */ IWebView*, |
|
116 /* [in] */ IWebURLRequest*, |
|
117 /* [retval][out] */ IWebView**) { return E_NOTIMPL; } |
|
118 |
|
119 virtual HRESULT STDMETHODCALLTYPE webViewShow( |
|
120 /* [in] */ IWebView*) { return E_NOTIMPL; } |
|
121 |
|
122 virtual HRESULT STDMETHODCALLTYPE webViewClose( |
|
123 /* [in] */ IWebView*) { return E_NOTIMPL; } |
|
124 |
|
125 virtual HRESULT STDMETHODCALLTYPE webViewFocus( |
|
126 /* [in] */ IWebView*) { return E_NOTIMPL; } |
|
127 |
|
128 virtual HRESULT STDMETHODCALLTYPE webViewUnfocus( |
|
129 /* [in] */ IWebView*) { return E_NOTIMPL; } |
|
130 |
|
131 virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder( |
|
132 /* [in] */ IWebView*, |
|
133 /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; } |
|
134 |
|
135 virtual HRESULT STDMETHODCALLTYPE makeFirstResponder( |
|
136 /* [in] */ IWebView*, |
|
137 /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } |
|
138 |
|
139 virtual HRESULT STDMETHODCALLTYPE setStatusText( |
|
140 /* [in] */ IWebView*, |
|
141 /* [in] */ BSTR) { return E_NOTIMPL; } |
|
142 |
|
143 virtual HRESULT STDMETHODCALLTYPE webViewStatusText( |
|
144 /* [in] */ IWebView*, |
|
145 /* [retval][out] */ BSTR*) { return E_NOTIMPL; } |
|
146 |
|
147 virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible( |
|
148 /* [in] */ IWebView*, |
|
149 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
150 |
|
151 virtual HRESULT STDMETHODCALLTYPE setToolbarsVisible( |
|
152 /* [in] */ IWebView*, |
|
153 /* [in] */ BOOL) { return E_NOTIMPL; } |
|
154 |
|
155 virtual HRESULT STDMETHODCALLTYPE webViewIsStatusBarVisible( |
|
156 /* [in] */ IWebView*, |
|
157 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
158 |
|
159 virtual HRESULT STDMETHODCALLTYPE setStatusBarVisible( |
|
160 /* [in] */ IWebView*, |
|
161 /* [in] */ BOOL) { return E_NOTIMPL; } |
|
162 |
|
163 virtual HRESULT STDMETHODCALLTYPE webViewIsResizable( |
|
164 /* [in] */ IWebView*, |
|
165 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
166 |
|
167 virtual HRESULT STDMETHODCALLTYPE setResizable( |
|
168 /* [in] */ IWebView*, |
|
169 /* [in] */ BOOL) { return E_NOTIMPL; } |
|
170 |
|
171 virtual HRESULT STDMETHODCALLTYPE setFrame( |
|
172 /* [in] */ IWebView*, |
|
173 /* [in] */ RECT*) { return E_NOTIMPL; } |
|
174 |
|
175 virtual HRESULT STDMETHODCALLTYPE webViewFrame( |
|
176 /* [in] */ IWebView*, |
|
177 /* [retval][out] */ RECT*) { return E_NOTIMPL; } |
|
178 |
|
179 virtual HRESULT STDMETHODCALLTYPE setContentRect( |
|
180 /* [in] */ IWebView*, |
|
181 /* [in] */ RECT*) { return E_NOTIMPL; } |
|
182 |
|
183 virtual HRESULT STDMETHODCALLTYPE webViewContentRect( |
|
184 /* [in] */ IWebView*, |
|
185 /* [retval][out] */ RECT*) { return E_NOTIMPL; } |
|
186 |
|
187 virtual HRESULT STDMETHODCALLTYPE runJavaScriptAlertPanelWithMessage( |
|
188 /* [in] */ IWebView*, |
|
189 /* [in] */ BSTR) { return E_NOTIMPL; } |
|
190 |
|
191 virtual HRESULT STDMETHODCALLTYPE runJavaScriptConfirmPanelWithMessage( |
|
192 /* [in] */ IWebView*, |
|
193 /* [in] */ BSTR, |
|
194 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
195 |
|
196 virtual HRESULT STDMETHODCALLTYPE runJavaScriptTextInputPanelWithPrompt( |
|
197 /* [in] */ IWebView*, |
|
198 /* [in] */ BSTR /*message*/, |
|
199 /* [in] */ BSTR /*defaultText*/, |
|
200 /* [retval][out] */ BSTR*) { return E_NOTIMPL; } |
|
201 |
|
202 virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage( |
|
203 /* [in] */ IWebView*, |
|
204 /* [in] */ BSTR /*message*/, |
|
205 /* [in] */ IWebFrame* /*initiatedByFrame*/, |
|
206 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
207 |
|
208 virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener( |
|
209 /* [in] */ IWebView*, |
|
210 /* [in] */ IWebOpenPanelResultListener*) { return E_NOTIMPL; } |
|
211 |
|
212 virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement( |
|
213 /* [in] */ IWebView*, |
|
214 /* [in] */ IPropertyBag*, |
|
215 /* [in] */ UINT /*modifierFlags*/) { return E_NOTIMPL; } |
|
216 |
|
217 virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement( |
|
218 /* [in] */ IWebView*, |
|
219 /* [in] */ IPropertyBag*, |
|
220 /* [in] */ OLE_HANDLE, |
|
221 /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; } |
|
222 |
|
223 virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem( |
|
224 /* [in] */ IWebView*, |
|
225 /* [in] */ UINT, |
|
226 /* [in] */ BOOL, |
|
227 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
228 |
|
229 virtual HRESULT STDMETHODCALLTYPE shouldPerformAction( |
|
230 /* [in] */ IWebView*, |
|
231 /* [in] */ UINT /*itemCommandID*/, |
|
232 /* [in] */ UINT /*sender*/) { return E_NOTIMPL; } |
|
233 |
|
234 virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo( |
|
235 /* [in] */ IWebView*, |
|
236 /* [in] */ IDataObject*, |
|
237 /* [retval][out] */ WebDragDestinationAction*) { return E_NOTIMPL; } |
|
238 |
|
239 virtual HRESULT STDMETHODCALLTYPE willPerformDragDestinationAction( |
|
240 /* [in] */ IWebView*, |
|
241 /* [in] */ WebDragDestinationAction, |
|
242 /* [in] */ IDataObject*) { return E_NOTIMPL; } |
|
243 |
|
244 virtual HRESULT STDMETHODCALLTYPE dragSourceActionMaskForPoint( |
|
245 /* [in] */ IWebView*, |
|
246 /* [in] */ LPPOINT, |
|
247 /* [retval][out] */ WebDragSourceAction*) { return E_NOTIMPL; } |
|
248 |
|
249 virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction( |
|
250 /* [in] */ IWebView*, |
|
251 /* [in] */ WebDragSourceAction, |
|
252 /* [in] */ LPPOINT, |
|
253 /* [in] */ IDataObject*) { return E_NOTIMPL; } |
|
254 |
|
255 virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected( |
|
256 /* [in] */ IWebView*, |
|
257 /* [in] */ void* /*item*/, |
|
258 /* [in] */ IPropertyBag*) { return E_NOTIMPL; } |
|
259 |
|
260 virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation( |
|
261 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
262 |
|
263 virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu( |
|
264 /* [in] */ IWebView*, |
|
265 /* [in] */ OLE_HANDLE, |
|
266 /* [in] */ LPPOINT) { return E_NOTIMPL; } |
|
267 |
|
268 virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem( |
|
269 /* [in] */ IWebView*, |
|
270 /* [in] */ void* /*measureItem*/) { return E_NOTIMPL; } |
|
271 |
|
272 virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem( |
|
273 /* [in] */ IWebView*, |
|
274 /* [in] */ void* /*drawItem*/) { return E_NOTIMPL; } |
|
275 |
|
276 virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData( |
|
277 /* [in] */ IWebView*, |
|
278 /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } |
|
279 |
|
280 virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData( |
|
281 /* [in] */ IWebView*, |
|
282 /* [in] */ OLE_HANDLE) { return E_NOTIMPL; } |
|
283 |
|
284 virtual HRESULT STDMETHODCALLTYPE canTakeFocus( |
|
285 /* [in] */ IWebView*, |
|
286 /* [in] */ BOOL /*forward*/, |
|
287 /* [out] */ BOOL*) { return E_NOTIMPL; } |
|
288 |
|
289 virtual HRESULT STDMETHODCALLTYPE takeFocus( |
|
290 /* [in] */ IWebView*, |
|
291 /* [in] */ BOOL /*forward*/) { return E_NOTIMPL; } |
|
292 |
|
293 virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget( |
|
294 /* [in] */ IWebUndoTarget*, |
|
295 /* [in] */ BSTR /*actionName*/, |
|
296 /* [in] */ IUnknown* /*actionArg*/) { return E_NOTIMPL; } |
|
297 |
|
298 virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget( |
|
299 /* [in] */ IWebUndoTarget*) { return E_NOTIMPL; } |
|
300 |
|
301 virtual HRESULT STDMETHODCALLTYPE setActionTitle( |
|
302 /* [in] */ BSTR) { return E_NOTIMPL; } |
|
303 |
|
304 virtual HRESULT STDMETHODCALLTYPE undo( void) { return E_NOTIMPL; } |
|
305 |
|
306 virtual HRESULT STDMETHODCALLTYPE redo( void) { return E_NOTIMPL; } |
|
307 |
|
308 virtual HRESULT STDMETHODCALLTYPE canUndo( |
|
309 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
310 |
|
311 virtual HRESULT STDMETHODCALLTYPE canRedo( |
|
312 /* [retval][out] */ BOOL*) { return E_NOTIMPL; } |
|
313 }; |
|
314 |
|
315 #endif //BaseDelegate_H |