| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) | 2 * Copyright (C) 2006 Eric Seidel (eric@webkit.org) |
| 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 Ideally, whenever you change a Client class, you should add a stub here. | 60 Ideally, whenever you change a Client class, you should add a stub here. |
| 61 Brittle, yes. Unfortunate, yes. Hopefully temporary. | 61 Brittle, yes. Unfortunate, yes. Hopefully temporary. |
| 62 */ | 62 */ |
| 63 | 63 |
| 64 namespace blink { | 64 namespace blink { |
| 65 | 65 |
| 66 class CORE_EXPORT EmptyChromeClient : public ChromeClient { | 66 class CORE_EXPORT EmptyChromeClient : public ChromeClient { |
| 67 WTF_MAKE_FAST_ALLOCATED(EmptyChromeClient); | 67 WTF_MAKE_FAST_ALLOCATED(EmptyChromeClient); |
| 68 public: | 68 public: |
| 69 virtual ~EmptyChromeClient() { } | 69 ~EmptyChromeClient() override { } |
| 70 virtual void chromeDestroyed() override { } | 70 void chromeDestroyed() override { } |
| 71 | 71 |
| 72 virtual void* webView() const override { return 0; } | 72 void* webView() const override { return nullptr; } |
| 73 virtual void setWindowRect(const IntRect&) override { } | 73 void setWindowRect(const IntRect&) override { } |
| 74 virtual IntRect windowRect() override { return IntRect(); } | 74 IntRect windowRect() override { return IntRect(); } |
| 75 | 75 |
| 76 virtual IntRect pageRect() override { return IntRect(); } | 76 IntRect pageRect() override { return IntRect(); } |
| 77 | 77 |
| 78 virtual void focus() override { } | 78 void focus() override { } |
| 79 | 79 |
| 80 virtual bool canTakeFocus(WebFocusType) override { return false; } | 80 bool canTakeFocus(WebFocusType) override { return false; } |
| 81 virtual void takeFocus(WebFocusType) override { } | 81 void takeFocus(WebFocusType) override { } |
| 82 | 82 |
| 83 virtual void focusedNodeChanged(Node*, Node*) override { } | 83 void focusedNodeChanged(Node*, Node*) override { } |
| 84 virtual void focusedFrameChanged(LocalFrame*) override { } | 84 void focusedFrameChanged(LocalFrame*) override { } |
| 85 virtual Page* createWindow(LocalFrame*, const FrameLoadRequest&, const Windo
wFeatures&, NavigationPolicy, ShouldSendReferrer) override { return 0; } | 85 Page* createWindow(LocalFrame*, const FrameLoadRequest&, const WindowFeature
s&, NavigationPolicy, ShouldSendReferrer) override { return nullptr; } |
| 86 virtual void show(NavigationPolicy) override { } | 86 void show(NavigationPolicy) override { } |
| 87 | 87 |
| 88 virtual void setToolbarsVisible(bool) override { } | 88 void setToolbarsVisible(bool) override { } |
| 89 virtual bool toolbarsVisible() override { return false; } | 89 bool toolbarsVisible() override { return false; } |
| 90 | 90 |
| 91 virtual void setStatusbarVisible(bool) override { } | 91 void setStatusbarVisible(bool) override { } |
| 92 virtual bool statusbarVisible() override { return false; } | 92 bool statusbarVisible() override { return false; } |
| 93 | 93 |
| 94 virtual void setScrollbarsVisible(bool) override { } | 94 void setScrollbarsVisible(bool) override { } |
| 95 virtual bool scrollbarsVisible() override { return false; } | 95 bool scrollbarsVisible() override { return false; } |
| 96 | 96 |
| 97 virtual void setMenubarVisible(bool) override { } | 97 void setMenubarVisible(bool) override { } |
| 98 virtual bool menubarVisible() override { return false; } | 98 bool menubarVisible() override { return false; } |
| 99 | 99 |
| 100 virtual void setResizable(bool) override { } | 100 void setResizable(bool) override { } |
| 101 | 101 |
| 102 virtual bool shouldReportDetailedMessageForSource(LocalFrame&, const String&
) override { return false; } | 102 bool shouldReportDetailedMessageForSource(LocalFrame&, const String&) overri
de { return false; } |
| 103 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c
onst String&, unsigned, const String&, const String&) override { } | 103 void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, const Str
ing&, unsigned, const String&, const String&) override { } |
| 104 | 104 |
| 105 virtual bool canRunBeforeUnloadConfirmPanel() override { return false; } | 105 bool canRunBeforeUnloadConfirmPanel() override { return false; } |
| 106 virtual bool runBeforeUnloadConfirmPanelInternal(LocalFrame*, const String&)
override { return true; } | 106 bool runBeforeUnloadConfirmPanelInternal(LocalFrame*, const String&) overrid
e { return true; } |
| 107 | 107 |
| 108 virtual void closeWindowSoon() override { } | 108 void closeWindowSoon() override { } |
| 109 | 109 |
| 110 virtual void runJavaScriptAlertInternal(LocalFrame*, const String&) override
{ } | 110 void runJavaScriptAlertInternal(LocalFrame*, const String&) override { } |
| 111 virtual bool runJavaScriptConfirmInternal(LocalFrame*, const String&) overri
de { return false; } | 111 bool runJavaScriptConfirmInternal(LocalFrame*, const String&) override { ret
urn false; } |
| 112 virtual bool runJavaScriptPromptInternal(LocalFrame*, const String&, const S
tring&, String&) override { return false; } | 112 bool runJavaScriptPromptInternal(LocalFrame*, const String&, const String&,
String&) override { return false; } |
| 113 | 113 |
| 114 virtual bool hasOpenedPopup() const override { return false; } | 114 bool hasOpenedPopup() const override { return false; } |
| 115 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, Popup
MenuClient*) override; | 115 PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, PopupMenuClie
nt*) override; |
| 116 virtual DOMWindow* pagePopupWindowForTesting() const override { return nullp
tr; } | 116 DOMWindow* pagePopupWindowForTesting() const override { return nullptr; } |
| 117 | 117 |
| 118 virtual void setStatusbarText(const String&) override { } | 118 void setStatusbarText(const String&) override { } |
| 119 | 119 |
| 120 virtual bool tabsToLinks() override { return false; } | 120 bool tabsToLinks() override { return false; } |
| 121 | 121 |
| 122 virtual IntRect windowResizerRect() const override { return IntRect(); } | 122 IntRect windowResizerRect() const override { return IntRect(); } |
| 123 | 123 |
| 124 virtual void invalidateRect(const IntRect&) override { } | 124 void invalidateRect(const IntRect&) override { } |
| 125 virtual void scheduleAnimation() override { } | 125 void scheduleAnimation() override { } |
| 126 | 126 |
| 127 virtual IntRect viewportToScreen(const IntRect& r) const override { return r
; } | 127 IntRect viewportToScreen(const IntRect& r) const override { return r; } |
| 128 virtual WebScreenInfo screenInfo() const override { return WebScreenInfo();
} | 128 WebScreenInfo screenInfo() const override { return WebScreenInfo(); } |
| 129 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const override
{ } | 129 void contentsSizeChanged(LocalFrame*, const IntSize&) const override { } |
| 130 | 130 |
| 131 virtual void showMouseOverURL(const HitTestResult&) override { } | 131 void showMouseOverURL(const HitTestResult&) override { } |
| 132 | 132 |
| 133 virtual void setToolTip(const String&, TextDirection) override { } | 133 void setToolTip(const String&, TextDirection) override { } |
| 134 | 134 |
| 135 virtual void printInternal(LocalFrame*) override { } | 135 void printInternal(LocalFrame*) override { } |
| 136 | 136 |
| 137 virtual void enumerateChosenDirectory(FileChooser*) override { } | 137 void enumerateChosenDirectory(FileChooser*) override { } |
| 138 | 138 |
| 139 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*,
ColorChooserClient*, const Color&) override; | 139 PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*, ColorCh
ooserClient*, const Color&) override; |
| 140 virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClien
t*, const DateTimeChooserParameters&) override; | 140 PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, cons
t DateTimeChooserParameters&) override; |
| 141 virtual void openTextDataListChooser(HTMLInputElement&) override; | 141 void openTextDataListChooser(HTMLInputElement&) override; |
| 142 | 142 |
| 143 virtual void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) override; | 143 void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) override; |
| 144 | 144 |
| 145 virtual void setCursorInternal(const Cursor&) override { } | 145 void setCursorInternal(const Cursor&) override { } |
| 146 | 146 |
| 147 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot)
override { } | 147 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override
{ } |
| 148 | 148 |
| 149 virtual void needTouchEvents(bool) override { } | 149 void needTouchEvents(bool) override { } |
| 150 virtual void setTouchAction(TouchAction touchAction) override { }; | 150 void setTouchAction(TouchAction) override { }; |
| 151 | 151 |
| 152 virtual void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMem
ber<Element>>&, LocalFrame* frame) override { } | 152 void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Elem
ent>>&, LocalFrame*) override { } |
| 153 | 153 |
| 154 virtual void annotatedRegionsChanged() override { } | 154 void annotatedRegionsChanged() override { } |
| 155 virtual String acceptLanguages() override; | 155 String acceptLanguages() override; |
| 156 | 156 |
| 157 virtual void registerPopupOpeningObserver(PopupOpeningObserver*) { }; | 157 void registerPopupOpeningObserver(PopupOpeningObserver*) override { }; |
| 158 virtual void unregisterPopupOpeningObserver(PopupOpeningObserver*) { }; | 158 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override { }; |
| 159 virtual void notifyPopupOpeningObservers() const { }; | |
| 160 }; | 159 }; |
| 161 | 160 |
| 162 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { | 161 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { |
| 163 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED(EmptyF
rameLoaderClient); | 162 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); WTF_MAKE_FAST_ALLOCATED(EmptyF
rameLoaderClient); |
| 164 public: | 163 public: |
| 165 EmptyFrameLoaderClient() { } | 164 EmptyFrameLoaderClient() { } |
| 166 virtual ~EmptyFrameLoaderClient() { } | 165 virtual ~EmptyFrameLoaderClient() { } |
| 167 | 166 |
| 168 virtual bool hasWebView() const override { return true; } // mainly for asse
rtions | 167 virtual bool hasWebView() const override { return true; } // mainly for asse
rtions |
| 169 | 168 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 virtual ~EmptyDragClient() {} | 312 virtual ~EmptyDragClient() {} |
| 314 virtual DragDestinationAction actionMaskForDrag(DragData*) override { return
DragDestinationActionNone; } | 313 virtual DragDestinationAction actionMaskForDrag(DragData*) override { return
DragDestinationActionNone; } |
| 315 virtual void startDrag(DragImage*, const IntPoint&, const IntPoint&, DataTra
nsfer*, LocalFrame*, bool) override { } | 314 virtual void startDrag(DragImage*, const IntPoint&, const IntPoint&, DataTra
nsfer*, LocalFrame*, bool) override { } |
| 316 }; | 315 }; |
| 317 | 316 |
| 318 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); | 317 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); |
| 319 | 318 |
| 320 } // namespace blink | 319 } // namespace blink |
| 321 | 320 |
| 322 #endif // EmptyClients_h | 321 #endif // EmptyClients_h |
| OLD | NEW |