• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 Eric Seidel (eric@webkit.org)
3  * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
5  * Copyright (C) 2012 Samsung Electronics. All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions and the following disclaimer.
12  * 2. Redistributions in binary form must reproduce the above copyright
13  *    notice, this list of conditions and the following disclaimer in the
14  *    documentation and/or other materials provided with the distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
20  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
24  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 #ifndef EmptyClients_h
30 #define EmptyClients_h
31 
32 #include "core/editing/UndoStep.h"
33 #include "core/inspector/InspectorClient.h"
34 #include "core/loader/FrameLoaderClient.h"
35 #include "core/page/BackForwardClient.h"
36 #include "core/page/ChromeClient.h"
37 #include "core/page/ContextMenuClient.h"
38 #include "core/page/DragClient.h"
39 #include "core/page/EditorClient.h"
40 #include "core/page/FocusType.h"
41 #include "core/page/Page.h"
42 #include "core/page/SpellCheckerClient.h"
43 #include "core/page/StorageClient.h"
44 #include "platform/DragImage.h"
45 #include "platform/geometry/FloatRect.h"
46 #include "platform/heap/Handle.h"
47 #include "platform/network/ResourceError.h"
48 #include "platform/text/TextCheckerClient.h"
49 #include "public/platform/WebScreenInfo.h"
50 #include "wtf/Forward.h"
51 #include <v8.h>
52 
53 /*
54  This file holds empty Client stubs for use by WebCore.
55  Viewless element needs to create a dummy Page->LocalFrame->FrameView tree for use in parsing or executing JavaScript.
56  This tree depends heavily on Clients (usually provided by WebKit classes).
57 
58  This file was first created for SVGImage as it had no way to access the current Page (nor should it,
59  since Images are not tied to a page).
60  See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion about this file.
61 
62  Ideally, whenever you change a Client class, you should add a stub here.
63  Brittle, yes.  Unfortunate, yes.  Hopefully temporary.
64 */
65 
66 namespace blink {
67 
68 class EmptyChromeClient : public ChromeClient {
69     WTF_MAKE_FAST_ALLOCATED;
70 public:
~EmptyChromeClient()71     virtual ~EmptyChromeClient() { }
chromeDestroyed()72     virtual void chromeDestroyed() OVERRIDE { }
73 
webView()74     virtual void* webView() const OVERRIDE { return 0; }
setWindowRect(const FloatRect &)75     virtual void setWindowRect(const FloatRect&) OVERRIDE { }
windowRect()76     virtual FloatRect windowRect() OVERRIDE { return FloatRect(); }
77 
pageRect()78     virtual FloatRect pageRect() OVERRIDE { return FloatRect(); }
79 
focus()80     virtual void focus() OVERRIDE { }
81 
canTakeFocus(FocusType)82     virtual bool canTakeFocus(FocusType) OVERRIDE { return false; }
takeFocus(FocusType)83     virtual void takeFocus(FocusType) OVERRIDE { }
84 
focusedNodeChanged(Node *)85     virtual void focusedNodeChanged(Node*) OVERRIDE { }
focusedFrameChanged(LocalFrame *)86     virtual void focusedFrameChanged(LocalFrame*) OVERRIDE { }
createWindow(LocalFrame *,const FrameLoadRequest &,const WindowFeatures &,NavigationPolicy,ShouldSendReferrer)87     virtual Page* createWindow(LocalFrame*, const FrameLoadRequest&, const WindowFeatures&, NavigationPolicy, ShouldSendReferrer) OVERRIDE { return 0; }
show(NavigationPolicy)88     virtual void show(NavigationPolicy) OVERRIDE { }
89 
canRunModal()90     virtual bool canRunModal() OVERRIDE { return false; }
runModal()91     virtual void runModal() OVERRIDE { }
92 
setToolbarsVisible(bool)93     virtual void setToolbarsVisible(bool) OVERRIDE { }
toolbarsVisible()94     virtual bool toolbarsVisible() OVERRIDE { return false; }
95 
setStatusbarVisible(bool)96     virtual void setStatusbarVisible(bool) OVERRIDE { }
statusbarVisible()97     virtual bool statusbarVisible() OVERRIDE { return false; }
98 
setScrollbarsVisible(bool)99     virtual void setScrollbarsVisible(bool) OVERRIDE { }
scrollbarsVisible()100     virtual bool scrollbarsVisible() OVERRIDE { return false; }
101 
setMenubarVisible(bool)102     virtual void setMenubarVisible(bool) OVERRIDE { }
menubarVisible()103     virtual bool menubarVisible() OVERRIDE { return false; }
104 
setResizable(bool)105     virtual void setResizable(bool) OVERRIDE { }
106 
shouldReportDetailedMessageForSource(const String &)107     virtual bool shouldReportDetailedMessageForSource(const String&) OVERRIDE { return false; }
addMessageToConsole(LocalFrame *,MessageSource,MessageLevel,const String &,unsigned,const String &,const String &)108     virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, const String&, unsigned, const String&, const String&) OVERRIDE { }
109 
canRunBeforeUnloadConfirmPanel()110     virtual bool canRunBeforeUnloadConfirmPanel() OVERRIDE { return false; }
runBeforeUnloadConfirmPanel(const String &,LocalFrame *)111     virtual bool runBeforeUnloadConfirmPanel(const String&, LocalFrame*) OVERRIDE { return true; }
112 
closeWindowSoon()113     virtual void closeWindowSoon() OVERRIDE { }
114 
runJavaScriptAlert(LocalFrame *,const String &)115     virtual void runJavaScriptAlert(LocalFrame*, const String&) OVERRIDE { }
runJavaScriptConfirm(LocalFrame *,const String &)116     virtual bool runJavaScriptConfirm(LocalFrame*, const String&) OVERRIDE { return false; }
runJavaScriptPrompt(LocalFrame *,const String &,const String &,String &)117     virtual bool runJavaScriptPrompt(LocalFrame*, const String&, const String&, String&) OVERRIDE { return false; }
118 
hasOpenedPopup()119     virtual bool hasOpenedPopup() const OVERRIDE { return false; }
120     virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, PopupMenuClient*) const OVERRIDE;
setPagePopupDriver(PagePopupDriver *)121     virtual void setPagePopupDriver(PagePopupDriver*) OVERRIDE { }
resetPagePopupDriver()122     virtual void resetPagePopupDriver() OVERRIDE { }
123 
setStatusbarText(const String &)124     virtual void setStatusbarText(const String&) OVERRIDE { }
125 
tabsToLinks()126     virtual bool tabsToLinks() OVERRIDE { return false; }
127 
windowResizerRect()128     virtual IntRect windowResizerRect() const OVERRIDE { return IntRect(); }
129 
invalidateContentsAndRootView(const IntRect &)130     virtual void invalidateContentsAndRootView(const IntRect&) OVERRIDE { }
invalidateContentsForSlowScroll(const IntRect &)131     virtual void invalidateContentsForSlowScroll(const IntRect&) OVERRIDE { }
scheduleAnimation()132     virtual void scheduleAnimation() OVERRIDE { }
133 
rootViewToScreen(const IntRect & r)134     virtual IntRect rootViewToScreen(const IntRect& r) const OVERRIDE { return r; }
screenInfo()135     virtual blink::WebScreenInfo screenInfo() const OVERRIDE { return blink::WebScreenInfo(); }
contentsSizeChanged(LocalFrame *,const IntSize &)136     virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const OVERRIDE { }
137 
mouseDidMoveOverElement(const HitTestResult &,unsigned)138     virtual void mouseDidMoveOverElement(const HitTestResult&, unsigned) OVERRIDE { }
139 
setToolTip(const String &,TextDirection)140     virtual void setToolTip(const String&, TextDirection) OVERRIDE { }
141 
print(LocalFrame *)142     virtual void print(LocalFrame*) OVERRIDE { }
143 
enumerateChosenDirectory(FileChooser *)144     virtual void enumerateChosenDirectory(FileChooser*) OVERRIDE { }
145 
146     virtual PassOwnPtr<ColorChooser> createColorChooser(LocalFrame*, ColorChooserClient*, const Color&) OVERRIDE;
147     virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const DateTimeChooserParameters&) OVERRIDE;
148     virtual void openTextDataListChooser(HTMLInputElement&) OVERRIDE;
149 
150     virtual void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) OVERRIDE;
151 
setCursor(const Cursor &)152     virtual void setCursor(const Cursor&) OVERRIDE { }
153 
attachRootGraphicsLayer(GraphicsLayer *)154     virtual void attachRootGraphicsLayer(GraphicsLayer*) OVERRIDE { }
155 
needTouchEvents(bool)156     virtual void needTouchEvents(bool) OVERRIDE { }
setTouchAction(TouchAction touchAction)157     virtual void setTouchAction(TouchAction touchAction) OVERRIDE { };
158 
didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Element>> &)159     virtual void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Element> >&) OVERRIDE { }
160 
annotatedRegionsChanged()161     virtual void annotatedRegionsChanged() OVERRIDE { }
paintCustomOverhangArea(GraphicsContext *,const IntRect &,const IntRect &,const IntRect &)162     virtual bool paintCustomOverhangArea(GraphicsContext*, const IntRect&, const IntRect&, const IntRect&) OVERRIDE { return false; }
163     virtual String acceptLanguages() OVERRIDE;
164 };
165 
166 class EmptyFrameLoaderClient : public FrameLoaderClient {
167     WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED;
168 public:
EmptyFrameLoaderClient()169     EmptyFrameLoaderClient() { }
~EmptyFrameLoaderClient()170     virtual ~EmptyFrameLoaderClient() {  }
171 
hasWebView()172     virtual bool hasWebView() const OVERRIDE { return true; } // mainly for assertions
173 
opener()174     virtual Frame* opener() const OVERRIDE { return 0; }
setOpener(Frame *)175     virtual void setOpener(Frame*) OVERRIDE { }
176 
parent()177     virtual Frame* parent() const OVERRIDE { return 0; }
top()178     virtual Frame* top() const OVERRIDE { return 0; }
previousSibling()179     virtual Frame* previousSibling() const OVERRIDE { return 0; }
nextSibling()180     virtual Frame* nextSibling() const OVERRIDE { return 0; }
firstChild()181     virtual Frame* firstChild() const OVERRIDE { return 0; }
lastChild()182     virtual Frame* lastChild() const OVERRIDE { return 0; }
detachedFromParent()183     virtual void detachedFromParent() OVERRIDE { }
184 
dispatchWillSendRequest(DocumentLoader *,unsigned long,ResourceRequest &,const ResourceResponse &)185     virtual void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) OVERRIDE { }
dispatchDidReceiveResponse(DocumentLoader *,unsigned long,const ResourceResponse &)186     virtual void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse&) OVERRIDE { }
dispatchDidFinishLoading(DocumentLoader *,unsigned long)187     virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long) OVERRIDE { }
dispatchDidLoadResourceFromMemoryCache(const ResourceRequest &,const ResourceResponse &)188     virtual void dispatchDidLoadResourceFromMemoryCache(const ResourceRequest&, const ResourceResponse&) OVERRIDE { }
189 
dispatchDidHandleOnloadEvents()190     virtual void dispatchDidHandleOnloadEvents() OVERRIDE { }
dispatchDidReceiveServerRedirectForProvisionalLoad()191     virtual void dispatchDidReceiveServerRedirectForProvisionalLoad() OVERRIDE { }
dispatchWillClose()192     virtual void dispatchWillClose() OVERRIDE { }
dispatchDidStartProvisionalLoad(bool isTransitionNavigation)193     virtual void dispatchDidStartProvisionalLoad(bool isTransitionNavigation) OVERRIDE { }
dispatchDidReceiveTitle(const String &)194     virtual void dispatchDidReceiveTitle(const String&) OVERRIDE { }
dispatchDidChangeIcons(IconType)195     virtual void dispatchDidChangeIcons(IconType) OVERRIDE { }
dispatchDidCommitLoad(LocalFrame *,HistoryItem *,HistoryCommitType)196     virtual void dispatchDidCommitLoad(LocalFrame*, HistoryItem*, HistoryCommitType) OVERRIDE { }
dispatchDidFailProvisionalLoad(const ResourceError &)197     virtual void dispatchDidFailProvisionalLoad(const ResourceError&) OVERRIDE { }
dispatchDidFailLoad(const ResourceError &)198     virtual void dispatchDidFailLoad(const ResourceError&) OVERRIDE { }
dispatchDidFinishDocumentLoad()199     virtual void dispatchDidFinishDocumentLoad() OVERRIDE { }
dispatchDidFinishLoad()200     virtual void dispatchDidFinishLoad() OVERRIDE { }
dispatchDidFirstVisuallyNonEmptyLayout()201     virtual void dispatchDidFirstVisuallyNonEmptyLayout() OVERRIDE { }
dispatchDidChangeThemeColor()202     virtual void dispatchDidChangeThemeColor() OVERRIDE { };
203 
204     virtual NavigationPolicy decidePolicyForNavigation(const ResourceRequest&, DocumentLoader*, NavigationPolicy, bool isTransitionNavigation) OVERRIDE;
205 
206     virtual void dispatchWillSendSubmitEvent(HTMLFormElement*) OVERRIDE;
207     virtual void dispatchWillSubmitForm(HTMLFormElement*) OVERRIDE;
208 
didStartLoading(LoadStartType)209     virtual void didStartLoading(LoadStartType) OVERRIDE { }
progressEstimateChanged(double)210     virtual void progressEstimateChanged(double) OVERRIDE { }
didStopLoading()211     virtual void didStopLoading() OVERRIDE { }
212 
213     virtual void loadURLExternally(const ResourceRequest&, NavigationPolicy, const String& = String()) OVERRIDE { }
214 
215     virtual PassRefPtr<DocumentLoader> createDocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&) OVERRIDE;
216 
userAgent(const KURL &)217     virtual String userAgent(const KURL&) OVERRIDE { return ""; }
218 
doNotTrackValue()219     virtual String doNotTrackValue() OVERRIDE { return String(); }
220 
transitionToCommittedForNewPage()221     virtual void transitionToCommittedForNewPage() OVERRIDE { }
222 
navigateBackForward(int offset)223     virtual bool navigateBackForward(int offset) const OVERRIDE { return false; }
didDisplayInsecureContent()224     virtual void didDisplayInsecureContent() OVERRIDE { }
didRunInsecureContent(SecurityOrigin *,const KURL &)225     virtual void didRunInsecureContent(SecurityOrigin*, const KURL&) OVERRIDE { }
didDetectXSS(const KURL &,bool)226     virtual void didDetectXSS(const KURL&, bool) OVERRIDE { }
didDispatchPingLoader(const KURL &)227     virtual void didDispatchPingLoader(const KURL&) OVERRIDE { }
selectorMatchChanged(const Vector<String> &,const Vector<String> &)228     virtual void selectorMatchChanged(const Vector<String>&, const Vector<String>&) OVERRIDE { }
229     virtual PassRefPtrWillBeRawPtr<LocalFrame> createFrame(const KURL&, const AtomicString&, const Referrer&, HTMLFrameOwnerElement*) OVERRIDE;
230     virtual PassRefPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool, DetachedPluginPolicy) OVERRIDE;
canCreatePluginWithoutRenderer(const String & mimeType)231     virtual bool canCreatePluginWithoutRenderer(const String& mimeType) const OVERRIDE { return false; }
232     virtual PassRefPtr<Widget> createJavaAppletWidget(HTMLAppletElement*, const KURL&, const Vector<String>&, const Vector<String>&) OVERRIDE;
233 
objectContentType(const KURL &,const String &,bool)234     virtual ObjectContentType objectContentType(const KURL&, const String&, bool) OVERRIDE { return ObjectContentType(); }
235 
dispatchDidClearWindowObjectInMainWorld()236     virtual void dispatchDidClearWindowObjectInMainWorld() OVERRIDE { }
documentElementAvailable()237     virtual void documentElementAvailable() OVERRIDE { }
238 
didCreateScriptContext(v8::Handle<v8::Context>,int extensionGroup,int worldId)239     virtual void didCreateScriptContext(v8::Handle<v8::Context>, int extensionGroup, int worldId) OVERRIDE { }
willReleaseScriptContext(v8::Handle<v8::Context>,int worldId)240     virtual void willReleaseScriptContext(v8::Handle<v8::Context>, int worldId) OVERRIDE { }
allowScriptExtension(const String & extensionName,int extensionGroup,int worldId)241     virtual bool allowScriptExtension(const String& extensionName, int extensionGroup, int worldId) OVERRIDE { return false; }
242 
cookieJar()243     virtual blink::WebCookieJar* cookieJar() const OVERRIDE { return 0; }
244 
245     virtual void didRequestAutocomplete(HTMLFormElement*) OVERRIDE;
246 
247     virtual PassOwnPtr<blink::WebServiceWorkerProvider> createServiceWorkerProvider() OVERRIDE;
isControlledByServiceWorker()248     virtual bool isControlledByServiceWorker() OVERRIDE { return false; }
249     virtual PassOwnPtr<blink::WebApplicationCacheHost> createApplicationCacheHost(blink::WebApplicationCacheHostClient*) OVERRIDE;
250 };
251 
252 class EmptyTextCheckerClient : public TextCheckerClient {
253 public:
~EmptyTextCheckerClient()254     ~EmptyTextCheckerClient() { }
255 
shouldEraseMarkersAfterChangeSelection(TextCheckingType)256     virtual bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const OVERRIDE { return true; }
checkSpellingOfString(const String &,int *,int *)257     virtual void checkSpellingOfString(const String&, int*, int*) OVERRIDE { }
getAutoCorrectSuggestionForMisspelledWord(const String &)258     virtual String getAutoCorrectSuggestionForMisspelledWord(const String&) OVERRIDE { return String(); }
checkGrammarOfString(const String &,Vector<GrammarDetail> &,int *,int *)259     virtual void checkGrammarOfString(const String&, Vector<GrammarDetail>&, int*, int*) OVERRIDE { }
260     virtual void requestCheckingOfString(PassRefPtrWillBeRawPtr<TextCheckingRequest>) OVERRIDE;
261 };
262 
263 class EmptySpellCheckerClient : public SpellCheckerClient {
264     WTF_MAKE_NONCOPYABLE(EmptySpellCheckerClient); WTF_MAKE_FAST_ALLOCATED;
265 public:
EmptySpellCheckerClient()266     EmptySpellCheckerClient() { }
~EmptySpellCheckerClient()267     virtual ~EmptySpellCheckerClient() { }
268 
isContinuousSpellCheckingEnabled()269     virtual bool isContinuousSpellCheckingEnabled() OVERRIDE { return false; }
toggleContinuousSpellChecking()270     virtual void toggleContinuousSpellChecking() OVERRIDE { }
isGrammarCheckingEnabled()271     virtual bool isGrammarCheckingEnabled() OVERRIDE { return false; }
272 
textChecker()273     virtual TextCheckerClient& textChecker() OVERRIDE { return m_textCheckerClient; }
274 
updateSpellingUIWithMisspelledWord(const String &)275     virtual void updateSpellingUIWithMisspelledWord(const String&) OVERRIDE { }
showSpellingUI(bool)276     virtual void showSpellingUI(bool) OVERRIDE { }
spellingUIIsShowing()277     virtual bool spellingUIIsShowing() OVERRIDE { return false; }
278 
279 private:
280     EmptyTextCheckerClient m_textCheckerClient;
281 };
282 
283 class EmptyEditorClient FINAL : public EditorClient {
284     WTF_MAKE_NONCOPYABLE(EmptyEditorClient); WTF_MAKE_FAST_ALLOCATED;
285 public:
EmptyEditorClient()286     EmptyEditorClient() { }
~EmptyEditorClient()287     virtual ~EmptyEditorClient() { }
288 
respondToChangedContents()289     virtual void respondToChangedContents() OVERRIDE { }
respondToChangedSelection(LocalFrame *,SelectionType)290     virtual void respondToChangedSelection(LocalFrame*, SelectionType) OVERRIDE { }
291 
canCopyCut(LocalFrame *,bool defaultValue)292     virtual bool canCopyCut(LocalFrame*, bool defaultValue) const OVERRIDE { return defaultValue; }
canPaste(LocalFrame *,bool defaultValue)293     virtual bool canPaste(LocalFrame*, bool defaultValue) const OVERRIDE { return defaultValue; }
294 
handleKeyboardEvent()295     virtual bool handleKeyboardEvent() OVERRIDE { return false; }
296 };
297 
298 class EmptyContextMenuClient FINAL : public ContextMenuClient {
299     WTF_MAKE_NONCOPYABLE(EmptyContextMenuClient); WTF_MAKE_FAST_ALLOCATED;
300 public:
EmptyContextMenuClient()301     EmptyContextMenuClient() { }
~EmptyContextMenuClient()302     virtual ~EmptyContextMenuClient() {  }
showContextMenu(const ContextMenu *)303     virtual void showContextMenu(const ContextMenu*) OVERRIDE { }
clearContextMenu()304     virtual void clearContextMenu() OVERRIDE { }
305 };
306 
307 class EmptyDragClient FINAL : public DragClient {
308     WTF_MAKE_NONCOPYABLE(EmptyDragClient); WTF_MAKE_FAST_ALLOCATED;
309 public:
EmptyDragClient()310     EmptyDragClient() { }
~EmptyDragClient()311     virtual ~EmptyDragClient() {}
actionMaskForDrag(DragData *)312     virtual DragDestinationAction actionMaskForDrag(DragData*) OVERRIDE { return DragDestinationActionNone; }
startDrag(DragImage *,const IntPoint &,const IntPoint &,DataTransfer *,LocalFrame *,bool)313     virtual void startDrag(DragImage*, const IntPoint&, const IntPoint&, DataTransfer*, LocalFrame*, bool) OVERRIDE { }
314 };
315 
316 class EmptyInspectorClient FINAL : public InspectorClient {
317     WTF_MAKE_NONCOPYABLE(EmptyInspectorClient); WTF_MAKE_FAST_ALLOCATED;
318 public:
EmptyInspectorClient()319     EmptyInspectorClient() { }
~EmptyInspectorClient()320     virtual ~EmptyInspectorClient() { }
321 
highlight()322     virtual void highlight() OVERRIDE { }
hideHighlight()323     virtual void hideHighlight() OVERRIDE { }
324 };
325 
326 class EmptyBackForwardClient FINAL : public BackForwardClient {
327 public:
backListCount()328     virtual int backListCount() OVERRIDE { return 0; }
forwardListCount()329     virtual int forwardListCount() OVERRIDE { return 0; }
backForwardListCount()330     virtual int backForwardListCount() OVERRIDE { return 0; }
331 };
332 
333 class EmptyStorageClient FINAL : public StorageClient {
334 public:
335     virtual PassOwnPtr<StorageNamespace> createSessionStorageNamespace() OVERRIDE;
canAccessStorage(LocalFrame *,StorageType)336     virtual bool canAccessStorage(LocalFrame*, StorageType) const OVERRIDE { return false; }
337 };
338 
339 void fillWithEmptyClients(Page::PageClients&);
340 
341 }
342 
343 #endif // EmptyClients_h
344