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