• 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 *)186     virtual HRESULT STDMETHODCALLTYPE willPerformDragSourceAction(
187         /* [in] */ IWebView*,
188         /* [in] */ WebDragSourceAction,
189         /* [in] */ LPPOINT,
190         /* [in] */ IDataObject*) { return E_NOTIMPL; }
191 
contextMenuItemSelected(IWebView *,void *,IPropertyBag *)192     virtual HRESULT STDMETHODCALLTYPE contextMenuItemSelected(
193         /* [in] */ IWebView*,
194         /* [in] */ void*  /*item*/,
195         /* [in] */ IPropertyBag*) { return E_NOTIMPL; }
196 
hasCustomMenuImplementation(BOOL *)197     virtual HRESULT STDMETHODCALLTYPE hasCustomMenuImplementation(
198         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
199 
trackCustomPopupMenu(IWebView *,OLE_HANDLE,LPPOINT)200     virtual HRESULT STDMETHODCALLTYPE trackCustomPopupMenu(
201         /* [in] */ IWebView*,
202         /* [in] */ OLE_HANDLE,
203         /* [in] */ LPPOINT) { return E_NOTIMPL; }
204 
measureCustomMenuItem(IWebView *,void *)205     virtual HRESULT STDMETHODCALLTYPE measureCustomMenuItem(
206         /* [in] */ IWebView*,
207         /* [in] */ void*  /*measureItem*/) { return E_NOTIMPL; }
208 
drawCustomMenuItem(IWebView *,void *)209     virtual HRESULT STDMETHODCALLTYPE drawCustomMenuItem(
210         /* [in] */ IWebView*,
211         /* [in] */ void*  /*drawItem*/) { return E_NOTIMPL; }
212 
addCustomMenuDrawingData(IWebView *,OLE_HANDLE)213     virtual HRESULT STDMETHODCALLTYPE addCustomMenuDrawingData(
214         /* [in] */ IWebView*,
215         /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
216 
cleanUpCustomMenuDrawingData(IWebView *,OLE_HANDLE)217     virtual HRESULT STDMETHODCALLTYPE cleanUpCustomMenuDrawingData(
218         /* [in] */ IWebView*,
219         /* [in] */ OLE_HANDLE) { return E_NOTIMPL; }
220 
canTakeFocus(IWebView *,BOOL,BOOL *)221     virtual HRESULT STDMETHODCALLTYPE canTakeFocus(
222         /* [in] */ IWebView*,
223         /* [in] */ BOOL /*forward*/,
224         /* [out] */ BOOL*) { return E_NOTIMPL; }
225 
takeFocus(IWebView *,BOOL)226     virtual HRESULT STDMETHODCALLTYPE takeFocus(
227         /* [in] */ IWebView*,
228         /* [in] */ BOOL /*forward*/) { return E_NOTIMPL; }
229 
registerUndoWithTarget(IWebUndoTarget *,BSTR,IUnknown *)230     virtual HRESULT STDMETHODCALLTYPE registerUndoWithTarget(
231         /* [in] */ IWebUndoTarget*,
232         /* [in] */ BSTR /*actionName*/,
233         /* [in] */ IUnknown*  /*actionArg*/) { return E_NOTIMPL; }
234 
removeAllActionsWithTarget(IWebUndoTarget *)235     virtual HRESULT STDMETHODCALLTYPE removeAllActionsWithTarget(
236         /* [in] */ IWebUndoTarget*) { return E_NOTIMPL; }
237 
setActionTitle(BSTR)238     virtual HRESULT STDMETHODCALLTYPE setActionTitle(
239         /* [in] */ BSTR) { return E_NOTIMPL; }
240 
undo()241     virtual HRESULT STDMETHODCALLTYPE undo() { return E_NOTIMPL; }
242 
redo()243     virtual HRESULT STDMETHODCALLTYPE redo() { return E_NOTIMPL; }
244 
canUndo(BOOL *)245     virtual HRESULT STDMETHODCALLTYPE canUndo(
246         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
247 
canRedo(BOOL *)248     virtual HRESULT STDMETHODCALLTYPE canRedo(
249         /* [retval][out] */ BOOL*) { return E_NOTIMPL; }
250 
251 private:
252     WebInspectorDelegate();
253 
254     ULONG m_refCount;
255 };
256 
257 #endif // WebInspectorDelegate_h
258