Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Provide a ScreenOrientationDispatcherHost getter.
Browse files Browse the repository at this point in the history
SSIA. We need it in order to be able to set ScreenOrientationProvider
from Xwalk.
  • Loading branch information
Mikhail Pozdnyakov authored and darktears committed Nov 17, 2014
1 parent 871cb25 commit 9f8a221
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions content/browser/web_contents/web_contents_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
}
Expand Down
1 change: 1 addition & 0 deletions content/browser/web_contents/web_contents_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions content/public/browser/web_contents.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class RenderFrameHost;
class RenderProcessHost;
class RenderViewHost;
class RenderWidgetHostView;
class ScreenOrientationDispatcherHost;
class SiteInstance;
class WebContentsDelegate;
struct CustomContextMenuContext;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9f8a221

Please sign in to comment.