Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Side by Side Diff: third_party/WebKit/Source/core/loader/EmptyClients.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo ut this file. 62 See http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion abo ut this file.
63 63
64 Ideally, whenever you change a Client class, you should add a stub here. 64 Ideally, whenever you change a Client class, you should add a stub here.
65 Brittle, yes. Unfortunate, yes. Hopefully temporary. 65 Brittle, yes. Unfortunate, yes. Hopefully temporary.
66 */ 66 */
67 67
68 namespace blink { 68 namespace blink {
69 69
70 class CORE_EXPORT EmptyChromeClient : public ChromeClient { 70 class CORE_EXPORT EmptyChromeClient : public ChromeClient {
71 public: 71 public:
72 static PassOwnPtrWillBeRawPtr<EmptyChromeClient> create() { return adoptPtrW illBeNoop(new EmptyChromeClient); } 72 static RawPtr<EmptyChromeClient> create() { return (new EmptyChromeClient); }
73 73
74 ~EmptyChromeClient() override {} 74 ~EmptyChromeClient() override {}
75 void chromeDestroyed() override {} 75 void chromeDestroyed() override {}
76 76
77 void* webView() const override { return nullptr; } 77 void* webView() const override { return nullptr; }
78 void setWindowRect(const IntRect&) override {} 78 void setWindowRect(const IntRect&) override {}
79 IntRect windowRect() override { return IntRect(); } 79 IntRect windowRect() override { return IntRect(); }
80 80
81 IntRect pageRect() override { return IntRect(); } 81 IntRect pageRect() override { return IntRect(); }
82 82
(...skipping 30 matching lines...) Expand all
113 bool canOpenBeforeUnloadConfirmPanel() override { return false; } 113 bool canOpenBeforeUnloadConfirmPanel() override { return false; }
114 bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, const String&, bool) override { return true; } 114 bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, const String&, bool) override { return true; }
115 115
116 void closeWindowSoon() override {} 116 void closeWindowSoon() override {}
117 117
118 bool openJavaScriptAlertDelegate(LocalFrame*, const String&) override { retu rn false; } 118 bool openJavaScriptAlertDelegate(LocalFrame*, const String&) override { retu rn false; }
119 bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) override { re turn false; } 119 bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) override { re turn false; }
120 bool openJavaScriptPromptDelegate(LocalFrame*, const String&, const String&, String&) override { return false; } 120 bool openJavaScriptPromptDelegate(LocalFrame*, const String&, const String&, String&) override { return false; }
121 121
122 bool hasOpenedPopup() const override { return false; } 122 bool hasOpenedPopup() const override { return false; }
123 PassRefPtrWillBeRawPtr<PopupMenu> openPopupMenu(LocalFrame&, HTMLSelectEleme nt&) override; 123 RawPtr<PopupMenu> openPopupMenu(LocalFrame&, HTMLSelectElement&) override;
124 DOMWindow* pagePopupWindowForTesting() const override { return nullptr; } 124 DOMWindow* pagePopupWindowForTesting() const override { return nullptr; }
125 125
126 void setStatusbarText(const String&) override {} 126 void setStatusbarText(const String&) override {}
127 127
128 bool tabsToLinks() override { return false; } 128 bool tabsToLinks() override { return false; }
129 129
130 IntRect windowResizerRect() const override { return IntRect(); } 130 IntRect windowResizerRect() const override { return IntRect(); }
131 131
132 void invalidateRect(const IntRect&) override {} 132 void invalidateRect(const IntRect&) override {}
133 void scheduleAnimation(Widget*) override {} 133 void scheduleAnimation(Widget*) override {}
134 134
135 IntRect viewportToScreen(const IntRect& r) const override { return r; } 135 IntRect viewportToScreen(const IntRect& r) const override { return r; }
136 FloatRect windowToViewport(const FloatRect& r) const override { return r; } 136 FloatRect windowToViewport(const FloatRect& r) const override { return r; }
137 WebScreenInfo screenInfo() const override { return WebScreenInfo(); } 137 WebScreenInfo screenInfo() const override { return WebScreenInfo(); }
138 void contentsSizeChanged(LocalFrame*, const IntSize&) const override {} 138 void contentsSizeChanged(LocalFrame*, const IntSize&) const override {}
139 139
140 void showMouseOverURL(const HitTestResult&) override {} 140 void showMouseOverURL(const HitTestResult&) override {}
141 141
142 void setToolTip(const String&, TextDirection) override {} 142 void setToolTip(const String&, TextDirection) override {}
143 143
144 void printDelegate(LocalFrame*) override {} 144 void printDelegate(LocalFrame*) override {}
145 145
146 void enumerateChosenDirectory(FileChooser*) override {} 146 void enumerateChosenDirectory(FileChooser*) override {}
147 147
148 PassOwnPtrWillBeRawPtr<ColorChooser> openColorChooser(LocalFrame*, ColorChoo serClient*, const Color&) override; 148 RawPtr<ColorChooser> openColorChooser(LocalFrame*, ColorChooserClient*, cons t Color&) override;
149 PassRefPtrWillBeRawPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserC lient*, const DateTimeChooserParameters&) override; 149 RawPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const Da teTimeChooserParameters&) override;
150 void openTextDataListChooser(HTMLInputElement&) override; 150 void openTextDataListChooser(HTMLInputElement&) override;
151 151
152 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override; 152 void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) override;
153 153
154 void setCursor(const Cursor&, LocalFrame* localRoot) override {} 154 void setCursor(const Cursor&, LocalFrame* localRoot) override {}
155 Cursor lastSetCursorForTesting() const override { return pointerCursor(); } 155 Cursor lastSetCursorForTesting() const override { return pointerCursor(); }
156 156
157 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override {} 157 void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) override {}
158 158
159 void setEventListenerProperties(WebEventListenerClass, WebEventListenerPrope rties) override {} 159 void setEventListenerProperties(WebEventListenerClass, WebEventListenerPrope rties) override {}
160 WebEventListenerProperties eventListenerProperties(WebEventListenerClass) co nst override { return WebEventListenerProperties::Nothing; } 160 WebEventListenerProperties eventListenerProperties(WebEventListenerClass) co nst override { return WebEventListenerProperties::Nothing; }
161 void setHaveScrollEventHandlers(bool) override {} 161 void setHaveScrollEventHandlers(bool) override {}
162 bool haveScrollEventHandlers() const override { return false; } 162 bool haveScrollEventHandlers() const override { return false; }
163 163
164 void setTouchAction(TouchAction) override {} 164 void setTouchAction(TouchAction) override {}
165 165
166 void didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Elem ent>>&, LocalFrame*) override {} 166 void didAssociateFormControls(const HeapVector<Member<Element>>&, LocalFrame *) override {}
167 167
168 void annotatedRegionsChanged() override {} 168 void annotatedRegionsChanged() override {}
169 String acceptLanguages() override; 169 String acceptLanguages() override;
170 170
171 void registerPopupOpeningObserver(PopupOpeningObserver*) override {} 171 void registerPopupOpeningObserver(PopupOpeningObserver*) override {}
172 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override {} 172 void unregisterPopupOpeningObserver(PopupOpeningObserver*) override {}
173 173
174 PassOwnPtr<WebFrameScheduler> createFrameScheduler() override; 174 PassOwnPtr<WebFrameScheduler> createFrameScheduler() override;
175 }; 175 };
176 176
177 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient { 177 class CORE_EXPORT EmptyFrameLoaderClient : public FrameLoaderClient {
178 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient); 178 WTF_MAKE_NONCOPYABLE(EmptyFrameLoaderClient);
179 USING_FAST_MALLOC_WILL_BE_REMOVED(EmptyFrameLoaderClient);
180 public: 179 public:
181 static PassOwnPtrWillBeRawPtr<EmptyFrameLoaderClient> create() { return adop tPtrWillBeNoop(new EmptyFrameLoaderClient); } 180 static RawPtr<EmptyFrameLoaderClient> create() { return (new EmptyFrameLoade rClient); }
182 ~EmptyFrameLoaderClient() override {} 181 ~EmptyFrameLoaderClient() override {}
183 182
184 bool hasWebView() const override { return true; } // mainly for assertions 183 bool hasWebView() const override { return true; } // mainly for assertions
185 184
186 bool inShadowTree() const override { return false; } 185 bool inShadowTree() const override { return false; }
187 186
188 Frame* opener() const override { return 0; } 187 Frame* opener() const override { return 0; }
189 void setOpener(Frame*) override {} 188 void setOpener(Frame*) override {}
190 189
191 Frame* parent() const override { return 0; } 190 Frame* parent() const override { return 0; }
(...skipping 29 matching lines...) Expand all
221 220
222 void dispatchWillSendSubmitEvent(HTMLFormElement*) override; 221 void dispatchWillSendSubmitEvent(HTMLFormElement*) override;
223 void dispatchWillSubmitForm(HTMLFormElement*) override; 222 void dispatchWillSubmitForm(HTMLFormElement*) override;
224 223
225 void didStartLoading(LoadStartType) override {} 224 void didStartLoading(LoadStartType) override {}
226 void progressEstimateChanged(double) override {} 225 void progressEstimateChanged(double) override {}
227 void didStopLoading() override {} 226 void didStopLoading() override {}
228 227
229 void loadURLExternally(const ResourceRequest&, NavigationPolicy, const Strin g&, bool) override {} 228 void loadURLExternally(const ResourceRequest&, NavigationPolicy, const Strin g&, bool) override {}
230 229
231 PassRefPtrWillBeRawPtr<DocumentLoader> createDocumentLoader(LocalFrame*, con st ResourceRequest&, const SubstituteData&) override; 230 RawPtr<DocumentLoader> createDocumentLoader(LocalFrame*, const ResourceReque st&, const SubstituteData&) override;
232 231
233 String userAgent() override { return ""; } 232 String userAgent() override { return ""; }
234 233
235 String doNotTrackValue() override { return String(); } 234 String doNotTrackValue() override { return String(); }
236 235
237 void transitionToCommittedForNewPage() override {} 236 void transitionToCommittedForNewPage() override {}
238 237
239 bool navigateBackForward(int offset) const override { return false; } 238 bool navigateBackForward(int offset) const override { return false; }
240 void didDisplayInsecureContent() override {} 239 void didDisplayInsecureContent() override {}
241 void didRunInsecureContent(SecurityOrigin*, const KURL&) override {} 240 void didRunInsecureContent(SecurityOrigin*, const KURL&) override {}
242 void didDetectXSS(const KURL&, bool) override {} 241 void didDetectXSS(const KURL&, bool) override {}
243 void didDispatchPingLoader(const KURL&) override {} 242 void didDispatchPingLoader(const KURL&) override {}
244 void didDisplayContentWithCertificateErrors(const KURL&, const CString&, con st WebURL& mainResourceUrl, const CString& mainResourceSecurityInfo) override {} 243 void didDisplayContentWithCertificateErrors(const KURL&, const CString&, con st WebURL& mainResourceUrl, const CString& mainResourceSecurityInfo) override {}
245 void didRunContentWithCertificateErrors(const KURL&, const CString&, const W ebURL& mainResourceUrl, const CString& mainResourceSecurityInfo) override {} 244 void didRunContentWithCertificateErrors(const KURL&, const CString&, const W ebURL& mainResourceUrl, const CString& mainResourceSecurityInfo) override {}
246 void selectorMatchChanged(const Vector<String>&, const Vector<String>&) over ride {} 245 void selectorMatchChanged(const Vector<String>&, const Vector<String>&) over ride {}
247 PassRefPtrWillBeRawPtr<LocalFrame> createFrame(const FrameLoadRequest&, cons t AtomicString&, HTMLFrameOwnerElement*) override; 246 RawPtr<LocalFrame> createFrame(const FrameLoadRequest&, const AtomicString&, HTMLFrameOwnerElement*) override;
248 PassRefPtrWillBeRawPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<String>&, const Vector<String>&, const String&, bool, DetachedPlug inPolicy) override; 247 RawPtr<Widget> createPlugin(HTMLPlugInElement*, const KURL&, const Vector<St ring>&, const Vector<String>&, const String&, bool, DetachedPluginPolicy) overri de;
249 bool canCreatePluginWithoutRenderer(const String& mimeType) const override { return false; } 248 bool canCreatePluginWithoutRenderer(const String& mimeType) const override { return false; }
250 PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaP layer::LoadType, const WebURL&, WebMediaPlayerClient*) override; 249 PassOwnPtr<WebMediaPlayer> createWebMediaPlayer(HTMLMediaElement&, WebMediaP layer::LoadType, const WebURL&, WebMediaPlayerClient*) override;
251 PassOwnPtr<WebMediaSession> createWebMediaSession() override; 250 PassOwnPtr<WebMediaSession> createWebMediaSession() override;
252 251
253 ObjectContentType objectContentType(const KURL&, const String&, bool) overri de { return ObjectContentType(); } 252 ObjectContentType objectContentType(const KURL&, const String&, bool) overri de { return ObjectContentType(); }
254 253
255 void didCreateNewDocument() override {} 254 void didCreateNewDocument() override {}
256 void dispatchDidClearWindowObjectInMainWorld() override {} 255 void dispatchDidClearWindowObjectInMainWorld() override {}
257 void documentElementAvailable() override {} 256 void documentElementAvailable() override {}
258 257
(...skipping 16 matching lines...) Expand all
275 EmptyFrameLoaderClient() {} 274 EmptyFrameLoaderClient() {}
276 }; 275 };
277 276
278 class CORE_EXPORT EmptyTextCheckerClient : public TextCheckerClient { 277 class CORE_EXPORT EmptyTextCheckerClient : public TextCheckerClient {
279 DISALLOW_NEW(); 278 DISALLOW_NEW();
280 public: 279 public:
281 ~EmptyTextCheckerClient() { } 280 ~EmptyTextCheckerClient() { }
282 281
283 void checkSpellingOfString(const String&, int*, int*) override {} 282 void checkSpellingOfString(const String&, int*, int*) override {}
284 void checkGrammarOfString(const String&, Vector<GrammarDetail>&, int*, int*) override {} 283 void checkGrammarOfString(const String&, Vector<GrammarDetail>&, int*, int*) override {}
285 void requestCheckingOfString(PassRefPtrWillBeRawPtr<TextCheckingRequest>) ov erride; 284 void requestCheckingOfString(RawPtr<TextCheckingRequest>) override;
286 }; 285 };
287 286
288 class EmptySpellCheckerClient : public SpellCheckerClient { 287 class EmptySpellCheckerClient : public SpellCheckerClient {
289 WTF_MAKE_NONCOPYABLE(EmptySpellCheckerClient); USING_FAST_MALLOC(EmptySpellC heckerClient); 288 WTF_MAKE_NONCOPYABLE(EmptySpellCheckerClient); USING_FAST_MALLOC(EmptySpellC heckerClient);
290 public: 289 public:
291 EmptySpellCheckerClient() {} 290 EmptySpellCheckerClient() {}
292 ~EmptySpellCheckerClient() override {} 291 ~EmptySpellCheckerClient() override {}
293 292
294 bool isContinuousSpellCheckingEnabled() override { return false; } 293 bool isContinuousSpellCheckingEnabled() override { return false; }
295 void toggleContinuousSpellChecking() override {} 294 void toggleContinuousSpellChecking() override {}
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 ~EmptyDragClient() override {} 334 ~EmptyDragClient() override {}
336 DragDestinationAction actionMaskForDrag(DragData*) override { return DragDes tinationActionNone; } 335 DragDestinationAction actionMaskForDrag(DragData*) override { return DragDes tinationActionNone; }
337 void startDrag(DragImage*, const IntPoint&, const IntPoint&, DataTransfer*, LocalFrame*, bool) override {} 336 void startDrag(DragImage*, const IntPoint&, const IntPoint&, DataTransfer*, LocalFrame*, bool) override {}
338 }; 337 };
339 338
340 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&); 339 CORE_EXPORT void fillWithEmptyClients(Page::PageClients&);
341 340
342 } // namespace blink 341 } // namespace blink
343 342
344 #endif // EmptyClients_h 343 #endif // EmptyClients_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698