From 9f8a221f6291b0974a1bcb53527bfd4f5ea7d132 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Mon, 7 Jul 2014 17:19:13 -0300 Subject: [PATCH] Provide a ScreenOrientationDispatcherHost getter. SSIA. We need it in order to be able to set ScreenOrientationProvider from Xwalk. --- content/browser/web_contents/web_contents_impl.cc | 4 ++++ content/browser/web_contents/web_contents_impl.h | 1 + content/public/browser/web_contents.h | 3 +++ 3 files changed, 8 insertions(+) diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 09e47aff206d5..b8c201702090a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -646,6 +646,10 @@ const GURL& WebContentsImpl::GetLastCommittedURL() const { return entry ? entry->GetVirtualURL() : GURL::EmptyGURL(); } +ScreenOrientationDispatcherHost* WebContentsImpl::GetScreenOrientationDispatcherHost() { + return screen_orientation_dispatcher_host_.get(); +} + WebContentsDelegate* WebContentsImpl::GetDelegate() { return delegate_; } diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index a2b7277414198..503d2af981948 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -197,6 +197,7 @@ class CONTENT_EXPORT WebContentsImpl void RemoveAccessibilityMode(AccessibilityMode mode); // WebContents ------------------------------------------------------ + virtual ScreenOrientationDispatcherHost* GetScreenOrientationDispatcherHost() OVERRIDE; virtual WebContentsDelegate* GetDelegate() OVERRIDE; virtual void SetDelegate(WebContentsDelegate* delegate) OVERRIDE; virtual NavigationControllerImpl& GetController() OVERRIDE; diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h index 4f0d625767a8f..86b7fa92a830d 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -53,6 +53,7 @@ class RenderFrameHost; class RenderProcessHost; class RenderViewHost; class RenderWidgetHostView; +class ScreenOrientationDispatcherHost; class SiteInstance; class WebContentsDelegate; struct CustomContextMenuContext; @@ -148,6 +149,8 @@ class WebContents : public PageNavigator, // Intrinsic tab state ------------------------------------------------------- + virtual ScreenOrientationDispatcherHost* GetScreenOrientationDispatcherHost() = 0; + // Gets/Sets the delegate. virtual WebContentsDelegate* GetDelegate() = 0; virtual void SetDelegate(WebContentsDelegate* delegate) = 0;