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 committed May 28, 2014
1 parent b2129f3 commit b89bd27
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/browser/renderer_host/render_process_host_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,11 @@ void RenderProcessHostImpl::NotifyTimezoneChange() {
Send(new ViewMsg_TimezoneChange());
}

ScreenOrientationDispatcherHost* RenderProcessHostImpl
::GetScreenOrientationDispatcherHost() {
return screen_orientation_dispatcher_host_;
}

void RenderProcessHostImpl::AddRoute(
int32 routing_id,
IPC::Listener* listener) {
Expand Down
3 changes: 3 additions & 0 deletions content/browser/renderer_host/render_process_host_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
OVERRIDE;
virtual void NotifyTimezoneChange() OVERRIDE;

virtual ScreenOrientationDispatcherHost* GetScreenOrientationDispatcherHost()
OVERRIDE;

// IPC::Sender via RenderProcessHost.
virtual bool Send(IPC::Message* msg) OVERRIDE;

Expand Down
5 changes: 5 additions & 0 deletions content/public/browser/render_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class BrowserContext;
class BrowserMessageFilter;
class RenderProcessHostObserver;
class RenderWidgetHost;
class ScreenOrientationDispatcherHost;
class StoragePartition;
struct GlobalRequestID;

Expand Down Expand Up @@ -215,6 +216,10 @@ class CONTENT_EXPORT RenderProcessHost : public IPC::Sender,
// have changed.
virtual void NotifyTimezoneChange() = 0;

// Returns message filter and dispatcher for screen orientation.
virtual ScreenOrientationDispatcherHost* GetScreenOrientationDispatcherHost()
= 0;

// Static management functions -----------------------------------------------

// Flag to run the renderer in process. This is primarily
Expand Down
5 changes: 5 additions & 0 deletions content/public/test/mock_render_process_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,11 @@ void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
}

ScreenOrientationDispatcherHost* MockRenderProcessHost
::GetScreenOrientationDispatcherHost() {
return NULL;
}

#if defined(ENABLE_WEBRTC)
void MockRenderProcessHost::EnableAecDump(const base::FilePath& file) {
}
Expand Down
3 changes: 3 additions & 0 deletions content/public/test/mock_render_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class MockRenderProcessHost : public RenderProcessHost {
OVERRIDE;
virtual void NotifyTimezoneChange() OVERRIDE;

virtual ScreenOrientationDispatcherHost* GetScreenOrientationDispatcherHost()
OVERRIDE;

// IPC::Sender via RenderProcessHost.
virtual bool Send(IPC::Message* msg) OVERRIDE;

Expand Down

0 comments on commit b89bd27

Please sign in to comment.