• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com>
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 WebInspectorDelegate_h
30 #define WebInspectorDelegate_h
31 
32 #include "WebKit.h"
33 
34 class WebInspectorDelegate : public IWebUIDelegate {
35 public:
36     static WebInspectorDelegate* createInstance();
37 
38     // IUnknown
39     virtual ULONG STDMETHODCALLTYPE AddRef();
40     virtual ULONG STDMETHODCALLTYPE Release();
QueryInterface(REFIID,void **)41     virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, void**) { return E_NOTIMPL; };
42 
43     // IWebUIDelegate
44     virtual HRESULT STDMETHODCALLTYPE dragDestinationActionMaskForDraggingInfo(
45         /* [in] */ IWebView*,
46         /* [in] */ IDataObject*,
47         /* [retval][out] */ WebDragDestinationAction* action);
48 
49     // Not implemented
createWebViewWithRequest(IWebView *,IWebURLRequest *,IWebView **)50     virtual HRESULT STDMETHODCALLTYPE createWebViewWithRequest(
51         /* [in] */ IWebView*,
52         /* [in] */ IWebURLRequest*,
53         /* [retval][out] */ IWebView**) { return E_NOTIMPL; }
54 
webViewShow(IWebView *)55     virtual HRESULT STDMETHODCALLTYPE webViewShow(
56         /* [in] */ IWebView*) { return E_NOTIMPL; }
57 
webViewClose(IWebView *)58     virtual HRESULT STDMETHODCALLTYPE webViewClose(
59         /* [in] */ IWebView*) { return E_NOTIMPL; }
60 
webViewFocus(IWebView *)61     virtual HRESULT STDMETHODCALLTYPE webViewFocus(
62         /* [in] */ IWebView*) { return E_NOTIMPL; }
63 
webViewUnfocus(IWebView *)64     virtual HRESULT STDMETHODCALLTYPE webViewUnfocus(
65         /* [in] */ IWebView*) { return E_NOTIMPL; }
66 
webViewFirstResponder(IWebView *,OLE_HANDLE *)67     virtual HRESULT STDMETHODCALLTYPE webViewFirstResponder(
68         /* [in] */ IWebView*,
69         /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; }
70 
makeFirstResponder(IWebView *,OLE_HANDLE)71     virtual HRESULT STDMETHODCALLTYPE makeFirstResponder(
72         /* [in] */ IWebView*,
73         /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
74 
setStatusText(IWebView *,BSTR)75     virtual HRESULT STDMETHODCALLTYPE setStatusText(
76         /* [in] */ IWebView*,
77         /* [in] */ BSTR) { return E_NOTIMPL; }
78 
webViewStatusText(IWebView *,BSTR *)79     virtual HRESULT STDMETHODCALLTYPE webViewStatusText(
80         /* [in] */ IWebView*,
81         /* [retval][out] */ BSTR*) { return E_NOTIMPL; }
82 
webViewAreToolbarsVisible(IWebView *,BOOL *)83     virtual HRESULT STDMETHODCALLTYPE webViewAreToolbarsVisible(
84         /* [in] */ IWebView*,
85         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
86 
setToolbarsVisible(IWebView *,BOOL)87     virtual HRESULT STDMETHODCALLTYPE setToolbarsVisible(
88         /* [in] */ IWebView*,
89         /* [in] */ BOOL) { return E_NOTIMPL; }
90 
webViewIsStatusBarVisible(IWebView *,BOOL *)91     virtual HRESULT STDMETHODCALLTYPE webViewIsStatusBarVisible(
92         /* [in] */ IWebView*,
93         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
94 
setStatusBarVisible(IWebView *,BOOL)95     virtual HRESULT STDMETHODCALLTYPE setStatusBarVisible(
96         /* [in] */ IWebView*,
97         /* [in] */ BOOL) { return E_NOTIMPL; }
98 
webViewIsResizable(IWebView *,BOOL *)99     virtual HRESULT STDMETHODCALLTYPE webViewIsResizable(
100         /* [in] */ IWebView*,
101         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
102 
setResizable(IWebView *,BOOL)103     virtual HRESULT STDMETHODCALLTYPE setResizable(
104         /* [in] */ IWebView*,
105         /* [in] */ BOOL) { return E_NOTIMPL; }
106 
setFrame(IWebView *,RECT *)107     virtual HRESULT STDMETHODCALLTYPE setFrame(
108         /* [in] */ IWebView*,
109         /* [in] */ RECT*) { return E_NOTIMPL; }
110 
webViewFrame(IWebView *,RECT *)111     virtual HRESULT STDMETHODCALLTYPE webViewFrame(
112         /* [in] */ IWebView*,
113         /* [retval][out] */ RECT*) { return E_NOTIMPL; }
114 
setContentRect(IWebView *,RECT *)115     virtual HRESULT STDMETHODCALLTYPE setContentRect(
116         /* [in] */ IWebView*,
117         /* [in] */ RECT*) { return E_NOTIMPL; }
118 
webViewContentRect(IWebView *,RECT *)119     virtual HRESULT STDMETHODCALLTYPE webViewContentRect(
120         /* [in] */ IWebView*,
121         /* [retval][out] */ RECT*) { return E_NOTIMPL; }
122 
runJavaScriptAlertPanelWithMessage(IWebView *,BSTR)123     virtual HRESULT STDMETHODCALLTYPE runJavaScriptAlertPanelWithMessage(
124         /* [in] */ IWebView*,
125         /* [in] */ BSTR) { return E_NOTIMPL; }
126 
runJavaScriptConfirmPanelWithMessage(IWebView *,BSTR,BOOL *)127     virtual HRESULT STDMETHODCALLTYPE runJavaScriptConfirmPanelWithMessage(
128         /* [in] */ IWebView*,
129         /* [in] */ BSTR,
130         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
131 
runJavaScriptTextInputPanelWithPrompt(IWebView *,BSTR,BSTR,BSTR *)132     virtual HRESULT STDMETHODCALLTYPE runJavaScriptTextInputPanelWithPrompt(
133         /* [in] */ IWebView*,
134         /* [in] */ BSTR /*message*/,
135         /* [in] */ BSTR /*defaultText*/,
136         /* [retval][out] */ BSTR*) { return E_NOTIMPL; }
137 
runBeforeUnloadConfirmPanelWithMessage(IWebView *,BSTR,IWebFrame *,BOOL *)138     virtual HRESULT STDMETHODCALLTYPE runBeforeUnloadConfirmPanelWithMessage(
139         /* [in] */ IWebView*,
140         /* [in] */ BSTR /*message*/,
141         /* [in] */ IWebFrame*  /*initiatedByFrame*/,
142         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
143 
runOpenPanelForFileButtonWithResultListener(IWebView *,IWebOpenPanelResultListener *)144     virtual HRESULT STDMETHODCALLTYPE runOpenPanelForFileButtonWithResultListener(
145         /* [in] */ IWebView*,
146         /* [in] */ IWebOpenPanelResultListener*) { return E_NOTIMPL; }
147 
mouseDidMoveOverElement(IWebView *,IPropertyBag *,UINT)148     virtual HRESULT STDMETHODCALLTYPE mouseDidMoveOverElement(
149         /* [in] */ IWebView*,
150         /* [in] */ IPropertyBag*,
151         /* [in] */ UINT /*modifierFlags*/) { return E_NOTIMPL; }
152 
contextMenuItemsForElement(IWebView *,IPropertyBag *,OLE_HANDLE,OLE_HANDLE *)153     virtual HRESULT STDMETHODCALLTYPE contextMenuItemsForElement(
154         /* [in] */ IWebView*,
155         /* [in] */ IPropertyBag*,
156         /* [in] */ OLE_HANDLE,
157         /* [retval][out] */ OLE_HANDLE*) { return E_NOTIMPL; }
158 
validateUserInterfaceItem(IWebView *,UINT,BOOL,BOOL *)159     virtual HRESULT STDMETHODCALLTYPE validateUserInterfaceItem(
160         /* [in] */ IWebView*,
161         /* [in] */ UINT,
162         /* [in] */ BOOL,
163         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
164 
shouldPerformAction(IWebView *,UINT,UINT)165     virtual HRESULT STDMETHODCALLTYPE shouldPerformAction(
166         /* [in] */ IWebView*,
167         /* [in] */ UINT /*itemCommandID*/,
168         /* [in] */ UINT /*sender*/) { return E_NOTIMPL; }
169 
willPerformDragDestinationAction(IWebView *,WebDragDestinationAction,IDataObject *)170     virtual HRESULT STDMETHODCALLTYPE willPerformDragDestinationAction(
171         /* [in] */ IWebView*,
172         /* [in] */ WebDragDestinationAction,
173         /* [in] */ IDataObject*) { return E_NOTIMPL; }
174 
dragSourceActionMaskForPoint(IWebView *,LPPOINT,WebDragSourceAction *)175     virtual HRESULT STDMETHODCALLTYPE dragSourceActionMaskForPoint(
176         /* [in] */ IWebView*,
177         /* [in] */ LPPOINT,
178         /* [retval][out] */ WebDragSourceAction*) { return E_NOTIMPL; }
179 
willPerformDragSourceAction(IWebView *,WebDragSourceAction,LPPOINT,IDataObject *,IDataObject **)180     virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction(
181         /* [in] */ IWebView*,
182         /* [in] */ WebDragSourceAction,
183         /* [in] */ LPPOINT,
184         /* [in] */ IDataObject*,
185         /* [retval][out] */ IDataObject**) { return E_NOTIMPL; }
186 
contextMenuItemSelected(IWebView *,void *,IPropertyBag *)187     virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected(
188         /* [in] */ IWebView*,
189         /* [in] */ void*  /*item*/,
190         /* [in] */ IPropertyBag*) { return E_NOTIMPL; }
191 
hasCustomMenuImplementation(BOOL *)192     virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation(
193         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
194 
trackCustomPopupMenu(IWebView *,OLE_HANDLE,LPPOINT)195     virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(
196         /* [in] */ IWebView*,
197         /* [in] */ OLE_HANDLE,
198         /* [in] */ LPPOINT) { return E_NOTIMPL; }
199 
measureCustomMenuItem(IWebView *,void *)200     virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem(
201         /* [in] */ IWebView*,
202         /* [in] */ void*  /*measureItem*/) { return E_NOTIMPL; }
203 
drawCustomMenuItem(IWebView *,void *)204     virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem(
205         /* [in] */ IWebView*,
206         /* [in] */ void*  /*drawItem*/) { return E_NOTIMPL; }
207 
addCustomMenuDrawingData(IWebView *,OLE_HANDLE)208     virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(
209         /* [in] */ IWebView*,
210         /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
211 
cleanUpCustomMenuDrawingData(IWebView *,OLE_HANDLE)212     virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(
213         /* [in] */ IWebView*,
214         /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
215 
canTakeFocus(IWebView *,BOOL,BOOL *)216     virtual HRESULT STDMETHODCALLTYPE canTakeFocus(
217         /* [in] */ IWebView*,
218         /* [in] */ BOOL /*forward*/,
219         /* [out] */ BOOL*) { return E_NOTIMPL; }
220 
takeFocus(IWebView *,BOOL)221     virtual HRESULT STDMETHODCALLTYPE takeFocus(
222         /* [in] */ IWebView*,
223         /* [in] */ BOOL /*forward*/) { return E_NOTIMPL; }
224 
registerUndoWithTarget(IWebUndoTarget *,BSTR,IUnknown *)225     virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget(
226         /* [in] */ IWebUndoTarget*,
227         /* [in] */ BSTR /*actionName*/,
228         /* [in] */ IUnknown*  /*actionArg*/) { return E_NOTIMPL; }
229 
removeAllActionsWithTarget(IWebUndoTarget *)230     virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget(
231         /* [in] */ IWebUndoTarget*) { return E_NOTIMPL; }
232 
setActionTitle(BSTR)233     virtual HRESULT STDMETHODCALLTYPE setActionTitle(
234         /* [in] */ BSTR) { return E_NOTIMPL; }
235 
undo()236     virtual HRESULT STDMETHODCALLTYPE undo() { return E_NOTIMPL; }
237 
redo()238     virtual HRESULT STDMETHODCALLTYPE redo() { return E_NOTIMPL; }
239 
canUndo(BOOL *)240     virtual HRESULT STDMETHODCALLTYPE canUndo(
241         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
242 
canRedo(BOOL *)243     virtual HRESULT STDMETHODCALLTYPE canRedo(
244         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
245 
printFrame(IWebView * webView,IWebFrame * frame)246     virtual HRESULT STDMETHODCALLTYPE printFrame(
247         /* [in] */ IWebView *webView,
248         /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
249 
ftpDirectoryTemplatePath(IWebView * webView,BSTR * path)250     virtual HRESULT STDMETHODCALLTYPE ftpDirectoryTemplatePath(
251         /* [in] */ IWebView *webView,
252         /* [retval][out] */ BSTR *path) { return E_NOTIMPL; }
253 
webViewHeaderHeight(IWebView * webView,float * result)254     virtual HRESULT STDMETHODCALLTYPE webViewHeaderHeight(
255         /* [in] */ IWebView *webView,
256         /* [retval][out] */ float *result) { return E_NOTIMPL; }
257 
webViewFooterHeight(IWebView * webView,float * result)258     virtual HRESULT STDMETHODCALLTYPE webViewFooterHeight(
259         /* [in] */ IWebView *webView,
260         /* [retval][out] */ float *result) { return E_NOTIMPL; }
261 
drawHeaderInRect(IWebView * webView,RECT * rect,OLE_HANDLE drawingContext)262     virtual HRESULT STDMETHODCALLTYPE drawHeaderInRect(
263         /* [in] */ IWebView *webView,
264         /* [in] */ RECT *rect,
265         /* [in] */ OLE_HANDLE drawingContext) { return E_NOTIMPL; }
266 
drawFooterInRect(IWebView * webView,RECT * rect,OLE_HANDLE drawingContext,UINT pageIndex,UINT pageCount)267     virtual HRESULT STDMETHODCALLTYPE drawFooterInRect(
268         /* [in] */ IWebView *webView,
269         /* [in] */ RECT *rect,
270         /* [in] */ OLE_HANDLE drawingContext,
271         /* [in] */ UINT pageIndex,
272         /* [in] */ UINT pageCount) { return E_NOTIMPL; }
273 
webViewPrintingMarginRect(IWebView * webView,RECT * rect)274     virtual HRESULT STDMETHODCALLTYPE webViewPrintingMarginRect(
275         /* [in] */ IWebView *webView,
276         /* [retval][out] */ RECT *rect) { return E_NOTIMPL; }
277 
canRunModal(IWebView * webView,BOOL * canRunBoolean)278     virtual HRESULT STDMETHODCALLTYPE canRunModal(
279         /* [in] */ IWebView *webView,
280         /* [retval][out] */ BOOL *canRunBoolean) { return E_NOTIMPL; }
281 
createModalDialog(IWebView * sender,IWebURLRequest * request,IWebView ** newWebView)282     virtual HRESULT STDMETHODCALLTYPE createModalDialog(
283         /* [in] */ IWebView *sender,
284         /* [in] */ IWebURLRequest *request,
285         /* [retval][out] */ IWebView **newWebView) { return E_NOTIMPL; }
286 
runModal(IWebView * webView)287     virtual HRESULT STDMETHODCALLTYPE runModal(
288         /* [in] */ IWebView *webView) { return E_NOTIMPL; }
289 
isMenuBarVisible(IWebView * webView,BOOL * visible)290     virtual HRESULT STDMETHODCALLTYPE isMenuBarVisible(
291         /* [in] */ IWebView *webView,
292         /* [retval][out] */ BOOL *visible) { return E_NOTIMPL; }
293 
setMenuBarVisible(IWebView * webView,BOOL visible)294     virtual HRESULT STDMETHODCALLTYPE setMenuBarVisible(
295         /* [in] */ IWebView *webView,
296         /* [in] */ BOOL visible) { return E_NOTIMPL; }
297 
runDatabaseSizeLimitPrompt(IWebView * webView,BSTR displayName,IWebFrame * initiatedByFrame,BOOL * allowed)298     virtual HRESULT STDMETHODCALLTYPE runDatabaseSizeLimitPrompt(
299         /* [in] */ IWebView *webView,
300         /* [in] */ BSTR displayName,
301         /* [in] */ IWebFrame *initiatedByFrame,
302         /* [retval][out] */ BOOL *allowed) { return E_NOTIMPL; }
303 
paintCustomScrollbar(IWebView * webView,HDC hDC,RECT rect,WebScrollBarControlSize size,WebScrollbarControlState state,WebScrollbarControlPart pressedPart,BOOL vertical,float value,float proportion,WebScrollbarControlPartMask parts)304     virtual HRESULT STDMETHODCALLTYPE paintCustomScrollbar(
305         /* [in] */ IWebView *webView,
306         /* [in] */ HDC hDC,
307         /* [in] */ RECT rect,
308         /* [in] */ WebScrollBarControlSize size,
309         /* [in] */ WebScrollbarControlState state,
310         /* [in] */ WebScrollbarControlPart pressedPart,
311         /* [in] */ BOOL vertical,
312         /* [in] */ float value,
313         /* [in] */ float proportion,
314         /* [in] */ WebScrollbarControlPartMask parts) { return E_NOTIMPL; }
315 
paintCustomScrollCorner(IWebView * webView,HDC hDC,RECT rect)316     virtual HRESULT STDMETHODCALLTYPE paintCustomScrollCorner(
317         /* [in] */ IWebView *webView,
318         /* [in] */ HDC hDC,
319         /* [in] */ RECT rect) { return E_NOTIMPL; }
320 
desktopNotificationsDelegate(IWebDesktopNotificationsDelegate ** result)321     virtual HRESULT STDMETHODCALLTYPE desktopNotificationsDelegate(
322         /* [retval][out] */ IWebDesktopNotificationsDelegate **result) { return E_NOTIMPL; }
323 
324 private:
325     WebInspectorDelegate();
326 
327     ULONG m_refCount;
328 };
329 
330 #endif // WebInspectorDelegate_h
331