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 THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_EMPTY_CLIENTS_H_
30 #define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_EMPTY_CLIENTS_H_
31 
32 #include <memory>
33 
34 #include "base/macros.h"
35 #include "cc/paint/paint_canvas.h"
36 #include "mojo/public/cpp/bindings/pending_remote.h"
37 #include "mojo/public/cpp/bindings/remote.h"
38 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
39 #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
40 #include "third_party/blink/public/common/input/web_menu_source_type.h"
41 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
42 #include "third_party/blink/public/common/widget/screen_info.h"
43 #include "third_party/blink/public/mojom/frame/viewport_intersection_state.mojom-blink.h"
44 #include "third_party/blink/public/mojom/input/focus_type.mojom-blink-forward.h"
45 #include "third_party/blink/public/platform/platform.h"
46 #include "third_party/blink/public/platform/web_spell_check_panel_host_client.h"
47 #include "third_party/blink/public/platform/web_url_loader.h"
48 #include "third_party/blink/renderer/core/core_export.h"
49 #include "third_party/blink/renderer/core/frame/local_frame_client.h"
50 #include "third_party/blink/renderer/core/frame/remote_frame_client.h"
51 #include "third_party/blink/renderer/core/page/chrome_client.h"
52 #include "third_party/blink/renderer/core/page/page.h"
53 #include "third_party/blink/renderer/platform/cursors.h"
54 #include "third_party/blink/renderer/platform/exported/wrapped_resource_request.h"
55 #include "third_party/blink/renderer/platform/geometry/float_point.h"
56 #include "third_party/blink/renderer/platform/geometry/float_rect.h"
57 #include "third_party/blink/renderer/platform/geometry/int_rect.h"
58 #include "third_party/blink/renderer/platform/graphics/touch_action.h"
59 #include "third_party/blink/renderer/platform/heap/handle.h"
60 #include "third_party/blink/renderer/platform/loader/fetch/resource_error.h"
61 #include "third_party/blink/renderer/platform/wtf/forward.h"
62 #include "ui/base/cursor/cursor.h"
63 #include "v8/include/v8.h"
64 
65 /*
66  This file holds empty Client stubs for use by WebCore.
67 
68  Viewless element needs to create a dummy Page->LocalFrame->FrameView tree for
69  use in parsing or executing JavaScript. This tree depends heavily on Clients
70  (usually provided by WebKit classes).
71 
72  This file was first created for SVGImage as it had no way to access the current
73  Page (nor should it, since Images are not tied to a page). See
74  http://bugs.webkit.org/show_bug.cgi?id=5971 for the original discussion about
75  this file.
76 
77  Ideally, whenever you change a Client class, you should add a stub here.
78  Brittle, yes. Unfortunate, yes. Hopefully temporary.
79 */
80 
81 namespace ui {
82 class Cursor;
83 }
84 
85 namespace blink {
86 
87 class CORE_EXPORT EmptyChromeClient : public ChromeClient {
88  public:
89   ~EmptyChromeClient() override = default;
90 
91   // ChromeClient implementation.
GetWebView()92   WebViewImpl* GetWebView() const override { return nullptr; }
ChromeDestroyed()93   void ChromeDestroyed() override {}
SetWindowRect(const IntRect &,LocalFrame &)94   void SetWindowRect(const IntRect&, LocalFrame&) override {}
RootWindowRect(LocalFrame &)95   IntRect RootWindowRect(LocalFrame&) override { return IntRect(); }
FocusPage()96   void FocusPage() override {}
DidFocusPage()97   void DidFocusPage() override {}
CanTakeFocus(mojom::blink::FocusType)98   bool CanTakeFocus(mojom::blink::FocusType) override { return false; }
TakeFocus(mojom::blink::FocusType)99   void TakeFocus(mojom::blink::FocusType) override {}
Show(const base::UnguessableToken & opener_frame_token,NavigationPolicy navigation_policy,const IntRect & initial_rect,bool user_gesture)100   void Show(const base::UnguessableToken& opener_frame_token,
101             NavigationPolicy navigation_policy,
102             const IntRect& initial_rect,
103             bool user_gesture) override {}
DidOverscroll(const gfx::Vector2dF &,const gfx::Vector2dF &,const gfx::PointF &,const gfx::Vector2dF &)104   void DidOverscroll(const gfx::Vector2dF&,
105                      const gfx::Vector2dF&,
106                      const gfx::PointF&,
107                      const gfx::Vector2dF&) override {}
SetOverscrollBehavior(LocalFrame & frame,const cc::OverscrollBehavior &)108   void SetOverscrollBehavior(LocalFrame& frame,
109                              const cc::OverscrollBehavior&) override {}
BeginLifecycleUpdates(LocalFrame & main_frame)110   void BeginLifecycleUpdates(LocalFrame& main_frame) override {}
StartDeferringCommits(LocalFrame & main_frame,base::TimeDelta timeout)111   void StartDeferringCommits(LocalFrame& main_frame,
112                              base::TimeDelta timeout) override {}
StopDeferringCommits(LocalFrame & main_frame,cc::PaintHoldingCommitTrigger)113   void StopDeferringCommits(LocalFrame& main_frame,
114                             cc::PaintHoldingCommitTrigger) override {}
StartDragging(LocalFrame *,const WebDragData &,DragOperationsMask,const SkBitmap & drag_image,const gfx::Point & drag_image_offset)115   void StartDragging(LocalFrame*,
116                      const WebDragData&,
117                      DragOperationsMask,
118                      const SkBitmap& drag_image,
119                      const gfx::Point& drag_image_offset) override {}
AcceptsLoadDrops()120   bool AcceptsLoadDrops() const override { return true; }
ShouldReportDetailedMessageForSource(LocalFrame &,const String &)121   bool ShouldReportDetailedMessageForSource(LocalFrame&,
122                                             const String&) override {
123     return false;
124   }
AddMessageToConsole(LocalFrame *,mojom::ConsoleMessageSource,mojom::ConsoleMessageLevel,const String &,unsigned,const String &,const String &)125   void AddMessageToConsole(LocalFrame*,
126                            mojom::ConsoleMessageSource,
127                            mojom::ConsoleMessageLevel,
128                            const String&,
129                            unsigned,
130                            const String&,
131                            const String&) override {}
CanOpenBeforeUnloadConfirmPanel()132   bool CanOpenBeforeUnloadConfirmPanel() override { return false; }
OpenBeforeUnloadConfirmPanelDelegate(LocalFrame *,bool)133   bool OpenBeforeUnloadConfirmPanelDelegate(LocalFrame*, bool) override {
134     return true;
135   }
CloseWindowSoon()136   void CloseWindowSoon() override {}
CreateWindowDelegate(LocalFrame *,const FrameLoadRequest &,const AtomicString &,const WebWindowFeatures &,network::mojom::blink::WebSandboxFlags,const FeaturePolicyFeatureState &,const SessionStorageNamespaceId &,bool & consumed_user_gesture)137   Page* CreateWindowDelegate(LocalFrame*,
138                              const FrameLoadRequest&,
139                              const AtomicString&,
140                              const WebWindowFeatures&,
141                              network::mojom::blink::WebSandboxFlags,
142                              const FeaturePolicyFeatureState&,
143                              const SessionStorageNamespaceId&,
144                              bool& consumed_user_gesture) override {
145     return nullptr;
146   }
OpenJavaScriptAlertDelegate(LocalFrame *,const String &)147   bool OpenJavaScriptAlertDelegate(LocalFrame*, const String&) override {
148     return false;
149   }
OpenJavaScriptConfirmDelegate(LocalFrame *,const String &)150   bool OpenJavaScriptConfirmDelegate(LocalFrame*, const String&) override {
151     return false;
152   }
OpenJavaScriptPromptDelegate(LocalFrame *,const String &,const String &,String &)153   bool OpenJavaScriptPromptDelegate(LocalFrame*,
154                                     const String&,
155                                     const String&,
156                                     String&) override {
157     return false;
158   }
HasOpenedPopup()159   bool HasOpenedPopup() const override { return false; }
160   PopupMenu* OpenPopupMenu(LocalFrame&, HTMLSelectElement&) override;
OpenPagePopup(PagePopupClient *)161   PagePopup* OpenPagePopup(PagePopupClient*) override { return nullptr; }
ClosePagePopup(PagePopup *)162   void ClosePagePopup(PagePopup*) override {}
PagePopupWindowForTesting()163   DOMWindow* PagePopupWindowForTesting() const override { return nullptr; }
164 
TabsToLinks()165   bool TabsToLinks() override { return false; }
166 
InvalidateRect(const IntRect &)167   void InvalidateRect(const IntRect&) override {}
168   void ScheduleAnimation(const LocalFrameView*,
169                          base::TimeDelta = base::TimeDelta()) override {}
ViewportToScreen(const IntRect & r,const LocalFrameView *)170   IntRect ViewportToScreen(const IntRect& r,
171                            const LocalFrameView*) const override {
172     return r;
173   }
WindowToViewportScalar(LocalFrame *,const float s)174   float WindowToViewportScalar(LocalFrame*, const float s) const override {
175     return s;
176   }
GetScreenInfo(LocalFrame &)177   ScreenInfo GetScreenInfo(LocalFrame&) const override { return ScreenInfo(); }
ContentsSizeChanged(LocalFrame *,const IntSize &)178   void ContentsSizeChanged(LocalFrame*, const IntSize&) const override {}
ShowMouseOverURL(const HitTestResult &)179   void ShowMouseOverURL(const HitTestResult&) override {}
SetToolTip(LocalFrame &,const String &,TextDirection)180   void SetToolTip(LocalFrame&, const String&, TextDirection) override {}
PrintDelegate(LocalFrame *)181   void PrintDelegate(LocalFrame*) override {}
182   ColorChooser* OpenColorChooser(LocalFrame*,
183                                  ColorChooserClient*,
184                                  const Color&) override;
185   DateTimeChooser* OpenDateTimeChooser(
186       LocalFrame* frame,
187       DateTimeChooserClient*,
188       const DateTimeChooserParameters&) override;
189   void OpenTextDataListChooser(HTMLInputElement&) override;
190   void OpenFileChooser(LocalFrame*, scoped_refptr<FileChooser>) override;
SetCursor(const ui::Cursor &,LocalFrame * local_root)191   void SetCursor(const ui::Cursor&, LocalFrame* local_root) override {}
SetCursorOverridden(bool)192   void SetCursorOverridden(bool) override {}
LastSetCursorForTesting()193   ui::Cursor LastSetCursorForTesting() const override {
194     return PointerCursor();
195   }
196   void AttachRootLayer(scoped_refptr<cc::Layer>,
197                        LocalFrame* local_root) override;
SetEventListenerProperties(LocalFrame *,cc::EventListenerClass,cc::EventListenerProperties)198   void SetEventListenerProperties(LocalFrame*,
199                                   cc::EventListenerClass,
200                                   cc::EventListenerProperties) override {}
EventListenerProperties(LocalFrame *,cc::EventListenerClass event_class)201   cc::EventListenerProperties EventListenerProperties(
202       LocalFrame*,
203       cc::EventListenerClass event_class) const override {
204     return cc::EventListenerProperties::kNone;
205   }
SetHasScrollEventHandlers(LocalFrame *,bool)206   void SetHasScrollEventHandlers(LocalFrame*, bool) override {}
SetNeedsLowLatencyInput(LocalFrame *,bool)207   void SetNeedsLowLatencyInput(LocalFrame*, bool) override {}
SetNeedsUnbufferedInputForDebugger(LocalFrame *,bool)208   void SetNeedsUnbufferedInputForDebugger(LocalFrame*, bool) override {}
RequestUnbufferedInputEvents(LocalFrame *)209   void RequestUnbufferedInputEvents(LocalFrame*) override {}
SetTouchAction(LocalFrame *,TouchAction)210   void SetTouchAction(LocalFrame*, TouchAction) override {}
DidAssociateFormControlsAfterLoad(LocalFrame *)211   void DidAssociateFormControlsAfterLoad(LocalFrame*) override {}
212   String AcceptLanguages() override;
RegisterPopupOpeningObserver(PopupOpeningObserver *)213   void RegisterPopupOpeningObserver(PopupOpeningObserver*) override {}
UnregisterPopupOpeningObserver(PopupOpeningObserver *)214   void UnregisterPopupOpeningObserver(PopupOpeningObserver*) override {}
NotifyPopupOpeningObservers()215   void NotifyPopupOpeningObservers() const override {}
216 
RequestBeginMainFrameNotExpected(LocalFrame & frame,bool request)217   void RequestBeginMainFrameNotExpected(LocalFrame& frame,
218                                         bool request) override {}
GetLayerTreeId(LocalFrame & frame)219   int GetLayerTreeId(LocalFrame& frame) override { return 0; }
SetCursorForPlugin(const ui::Cursor &,LocalFrame *)220   void SetCursorForPlugin(const ui::Cursor&, LocalFrame*) override {}
InstallSupplements(LocalFrame &)221   void InstallSupplements(LocalFrame&) override {}
MainFrameScrollOffsetChanged(LocalFrame & main_frame)222   void MainFrameScrollOffsetChanged(LocalFrame& main_frame) const override {}
BatterySavingsChanged(LocalFrame & main_frame,WebBatterySavingsFlags savings)223   void BatterySavingsChanged(LocalFrame& main_frame,
224                              WebBatterySavingsFlags savings) override {}
225 };
226 
227 class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
228  public:
229   EmptyLocalFrameClient() = default;
230   ~EmptyLocalFrameClient() override = default;
231 
HasWebView()232   bool HasWebView() const override { return true; }  // mainly for assertions
233 
InShadowTree()234   bool InShadowTree() const override { return false; }
235 
WillBeDetached()236   void WillBeDetached() override {}
Detached(FrameDetachType)237   void Detached(FrameDetachType) override {}
238 
DispatchWillSendRequest(ResourceRequest &)239   void DispatchWillSendRequest(ResourceRequest&) override {}
DispatchDidLoadResourceFromMemoryCache(const ResourceRequest &,const ResourceResponse &)240   void DispatchDidLoadResourceFromMemoryCache(
241       const ResourceRequest&,
242       const ResourceResponse&) override {}
243 
DispatchDidHandleOnloadEvents()244   void DispatchDidHandleOnloadEvents() override {}
DispatchDidReceiveTitle(const String &)245   void DispatchDidReceiveTitle(const String&) override {}
DispatchDidCommitLoad(HistoryItem *,WebHistoryCommitType,bool)246   void DispatchDidCommitLoad(HistoryItem*,
247                              WebHistoryCommitType,
248                              bool) override {}
DispatchDidFailLoad(const ResourceError &,WebHistoryCommitType)249   void DispatchDidFailLoad(const ResourceError&,
250                            WebHistoryCommitType) override {}
DispatchDidFinishDocumentLoad()251   void DispatchDidFinishDocumentLoad() override {}
DispatchDidFinishLoad()252   void DispatchDidFinishLoad() override {}
253 
254   void BeginNavigation(
255       const ResourceRequest&,
256       mojom::RequestContextFrameType,
257       LocalDOMWindow*,
258       DocumentLoader*,
259       WebNavigationType,
260       NavigationPolicy,
261       WebFrameLoadType,
262       bool,
263       TriggeringEventInfo,
264       HTMLFormElement*,
265       network::mojom::CSPDisposition,
266       mojo::PendingRemote<mojom::blink::BlobURLToken>,
267       base::TimeTicks,
268       const String&,
269       const base::Optional<WebImpression>&,
270       WTF::Vector<network::mojom::blink::ContentSecurityPolicyPtr>
271           initiator_csp,
272       network::mojom::blink::CSPSourcePtr initiator_self_source,
273       network::mojom::IPAddressSpace,
274       mojo::PendingRemote<mojom::blink::NavigationInitiator>) override;
275 
276   void DispatchWillSendSubmitEvent(HTMLFormElement*) override;
277 
DidStartLoading()278   void DidStartLoading() override {}
DidStopLoading()279   void DidStopLoading() override {}
280 
281   DocumentLoader* CreateDocumentLoader(
282       LocalFrame*,
283       WebNavigationType,
284       ContentSecurityPolicy*,
285       std::unique_ptr<WebNavigationParams> navigation_params,
286       std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) override;
UpdateDocumentLoader(DocumentLoader * document_loader,std::unique_ptr<WebDocumentLoader::ExtraData> extra_data)287   void UpdateDocumentLoader(
288       DocumentLoader* document_loader,
289       std::unique_ptr<WebDocumentLoader::ExtraData> extra_data) override {}
290 
UserAgent()291   String UserAgent() override { return ""; }
UserAgentMetadata()292   base::Optional<blink::UserAgentMetadata> UserAgentMetadata() override {
293     return blink::UserAgentMetadata();
294   }
295 
DoNotTrackValue()296   String DoNotTrackValue() override { return String(); }
297 
TransitionToCommittedForNewPage()298   void TransitionToCommittedForNewPage() override {}
299 
NavigateBackForward(int offset)300   bool NavigateBackForward(int offset) const override { return false; }
DidDispatchPingLoader(const KURL &)301   void DidDispatchPingLoader(const KURL&) override {}
SelectorMatchChanged(const Vector<String> &,const Vector<String> &)302   void SelectorMatchChanged(const Vector<String>&,
303                             const Vector<String>&) override {}
304   LocalFrame* CreateFrame(const AtomicString&, HTMLFrameOwnerElement*) override;
305   std::pair<RemoteFrame*, PortalToken> CreatePortal(
306       HTMLPortalElement*,
307       mojo::PendingAssociatedReceiver<mojom::blink::Portal>,
308       mojo::PendingAssociatedRemote<mojom::blink::PortalClient>) override;
309   RemoteFrame* AdoptPortal(HTMLPortalElement*) override;
310   WebPluginContainerImpl* CreatePlugin(HTMLPlugInElement&,
311                                        const KURL&,
312                                        const Vector<String>&,
313                                        const Vector<String>&,
314                                        const String&,
315                                        bool) override;
316   std::unique_ptr<WebMediaPlayer> CreateWebMediaPlayer(
317       HTMLMediaElement&,
318       const WebMediaPlayerSource&,
319       WebMediaPlayerClient*) override;
320   WebRemotePlaybackClient* CreateWebRemotePlaybackClient(
321       HTMLMediaElement&) override;
322 
DidCreateInitialEmptyDocument()323   void DidCreateInitialEmptyDocument() override {}
DidCommitDocumentReplacementNavigation(DocumentLoader *)324   void DidCommitDocumentReplacementNavigation(DocumentLoader*) override {}
DispatchDidClearWindowObjectInMainWorld()325   void DispatchDidClearWindowObjectInMainWorld() override {}
DocumentElementAvailable()326   void DocumentElementAvailable() override {}
RunScriptsAtDocumentElementAvailable()327   void RunScriptsAtDocumentElementAvailable() override {}
RunScriptsAtDocumentReady(bool)328   void RunScriptsAtDocumentReady(bool) override {}
RunScriptsAtDocumentIdle()329   void RunScriptsAtDocumentIdle() override {}
330 
DidCreateScriptContext(v8::Local<v8::Context>,int32_t world_id)331   void DidCreateScriptContext(v8::Local<v8::Context>,
332                               int32_t world_id) override {}
WillReleaseScriptContext(v8::Local<v8::Context>,int32_t world_id)333   void WillReleaseScriptContext(v8::Local<v8::Context>,
334                                 int32_t world_id) override {}
AllowScriptExtensions()335   bool AllowScriptExtensions() override { return false; }
336 
GetBrowserInterfaceBroker()337   BrowserInterfaceBrokerProxy& GetBrowserInterfaceBroker() override {
338     return GetEmptyBrowserInterfaceBroker();
339   }
340 
341   AssociatedInterfaceProvider* GetRemoteNavigationAssociatedInterfaces()
342       override;
343 
SpellCheckPanelHostClient()344   WebSpellCheckPanelHostClient* SpellCheckPanelHostClient() const override {
345     return nullptr;
346   }
347 
348   std::unique_ptr<WebServiceWorkerProvider> CreateServiceWorkerProvider()
349       override;
GetContentSettingsClient()350   WebContentSettingsClient* GetContentSettingsClient() override {
351     return nullptr;
352   }
353 
354   void SetTextCheckerClientForTesting(WebTextCheckClient*);
355   WebTextCheckClient* GetTextCheckerClient() const override;
356 
CreateURLLoaderFactory()357   std::unique_ptr<WebURLLoaderFactory> CreateURLLoaderFactory() override {
358     // Most consumers of EmptyLocalFrameClient should not make network requests.
359     // If an exception needs to be made (e.g. in test code), then the consumer
360     // should define their own subclass of LocalFrameClient or
361     // EmptyLocalFrameClient and override the CreateURLLoaderFactory method.
362     // See also https://crbug.com/891872.
363     NOTREACHED();
364     return nullptr;
365   }
366 
AnnotatedRegionsChanged()367   void AnnotatedRegionsChanged() override {}
GetDevToolsFrameToken()368   base::UnguessableToken GetDevToolsFrameToken() const override {
369     return base::UnguessableToken::Create();
370   }
evaluateInInspectorOverlayForTesting(const String & script)371   String evaluateInInspectorOverlayForTesting(const String& script) override {
372     return g_empty_string;
373   }
374 
375   Frame* FindFrame(const AtomicString& name) const override;
376 
377  protected:
378   // Not owned
379   WebTextCheckClient* text_check_client_;
380 
381   DISALLOW_COPY_AND_ASSIGN(EmptyLocalFrameClient);
382 };
383 
384 class EmptySpellCheckPanelHostClient : public WebSpellCheckPanelHostClient {
385   USING_FAST_MALLOC(EmptySpellCheckPanelHostClient);
386 
387  public:
388   EmptySpellCheckPanelHostClient() = default;
389 
ShowSpellingUI(bool)390   void ShowSpellingUI(bool) override {}
IsShowingSpellingUI()391   bool IsShowingSpellingUI() override { return false; }
UpdateSpellingUIWithMisspelledWord(const WebString &)392   void UpdateSpellingUIWithMisspelledWord(const WebString&) override {}
393 
394   DISALLOW_COPY_AND_ASSIGN(EmptySpellCheckPanelHostClient);
395 };
396 
397 class CORE_EXPORT EmptyRemoteFrameClient : public RemoteFrameClient {
398  public:
399   EmptyRemoteFrameClient();
400 
401   // RemoteFrameClient implementation.
Navigate(const ResourceRequest &,blink::WebLocalFrame * initiator_frame,bool should_replace_current_entry,bool is_opener_navigation,bool initiator_frame_has_download_sandbox_flag,bool initiator_frame_is_ad,mojo::PendingRemote<mojom::blink::BlobURLToken>,const base::Optional<WebImpression> &)402   void Navigate(const ResourceRequest&,
403                 blink::WebLocalFrame* initiator_frame,
404                 bool should_replace_current_entry,
405                 bool is_opener_navigation,
406                 bool initiator_frame_has_download_sandbox_flag,
407                 bool initiator_frame_is_ad,
408                 mojo::PendingRemote<mojom::blink::BlobURLToken>,
409                 const base::Optional<WebImpression>&) override {}
BackForwardLength()410   unsigned BackForwardLength() override { return 0; }
FrameRectsChanged(const IntRect & local_frame_rect,const IntRect & transformed_frame_rect)411   void FrameRectsChanged(const IntRect& local_frame_rect,
412                          const IntRect& transformed_frame_rect) override {}
SynchronizeVisualProperties()413   void SynchronizeVisualProperties() override {}
GetRemoteAssociatedInterfaces()414   AssociatedInterfaceProvider* GetRemoteAssociatedInterfaces() override {
415     return AssociatedInterfaceProvider::GetEmptyAssociatedInterfaceProvider();
416   }
417 
418   // FrameClient implementation.
InShadowTree()419   bool InShadowTree() const override { return false; }
Detached(FrameDetachType)420   void Detached(FrameDetachType) override {}
GetDevToolsFrameToken()421   base::UnguessableToken GetDevToolsFrameToken() const override {
422     return base::UnguessableToken::Create();
423   }
424 
425   DISALLOW_COPY_AND_ASSIGN(EmptyRemoteFrameClient);
426 };
427 
428 CORE_EXPORT void FillWithEmptyClients(Page::PageClients&);
429 
430 }  // namespace blink
431 
432 #endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_EMPTY_CLIENTS_H_
433