Chromium Code Reviews| Index: content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
| diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
| similarity index 78% |
| rename from content/browser/screen_orientation/screen_orientation_dispatcher_host.cc |
| rename to content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
| index 5d77d6c88958a53857c1f404cc415da2cebc97b1..646d92abc2983b13202d99d1105a5a3f1a3f84ec 100644 |
| --- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc |
| +++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc |
| @@ -2,50 +2,51 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "content/browser/screen_orientation/screen_orientation_dispatcher_host.h" |
| +#include "content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h" |
| -#include "content/browser/screen_orientation/screen_orientation_provider.h" |
| #include "content/common/screen_orientation_messages.h" |
| #include "content/public/browser/render_frame_host.h" |
| #include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/render_view_host.h" |
| #include "content/public/browser/render_widget_host.h" |
| +#include "content/public/browser/screen_orientation_dispatcher_host.h" |
|
mlamouri (slow - plz ping)
2014/09/03 11:25:49
I think screen_orientation_dispatcher_host.h is no
jonross
2014/09/03 20:33:02
Done.
|
| +#include "content/public/browser/screen_orientation_provider.h" |
| #include "content/public/browser/web_contents.h" |
| #include "third_party/WebKit/public/platform/WebScreenInfo.h" |
| namespace content { |
| -ScreenOrientationDispatcherHost::LockInformation::LockInformation( |
| +ScreenOrientationDispatcherHostImpl::LockInformation::LockInformation( |
| int request_id, int process_id, int routing_id) |
| : request_id(request_id), |
| process_id(process_id), |
| routing_id(routing_id) { |
| } |
| -ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost( |
| +ScreenOrientationDispatcherHostImpl::ScreenOrientationDispatcherHostImpl( |
| WebContents* web_contents) |
| : WebContentsObserver(web_contents), |
| current_lock_(NULL) { |
| provider_.reset(ScreenOrientationProvider::Create(this, web_contents)); |
| } |
| -ScreenOrientationDispatcherHost::~ScreenOrientationDispatcherHost() { |
| +ScreenOrientationDispatcherHostImpl::~ScreenOrientationDispatcherHostImpl() { |
| ResetCurrentLock(); |
| } |
| -void ScreenOrientationDispatcherHost::ResetCurrentLock() { |
| +void ScreenOrientationDispatcherHostImpl::ResetCurrentLock() { |
| if (current_lock_) { |
| delete current_lock_; |
| current_lock_ = 0; |
| } |
| } |
| -bool ScreenOrientationDispatcherHost::OnMessageReceived( |
| +bool ScreenOrientationDispatcherHostImpl::OnMessageReceived( |
| const IPC::Message& message, |
| RenderFrameHost* render_frame_host) { |
| bool handled = true; |
| - IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(ScreenOrientationDispatcherHost, message, |
| + IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(ScreenOrientationDispatcherHostImpl, message, |
| render_frame_host) |
| IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_LockRequest, OnLockRequest) |
| IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Unlock, OnUnlockRequest) |
| @@ -56,7 +57,7 @@ bool ScreenOrientationDispatcherHost::OnMessageReceived( |
| } |
| RenderFrameHost* |
| -ScreenOrientationDispatcherHost::GetRenderFrameHostForRequestID( |
| +ScreenOrientationDispatcherHostImpl::GetRenderFrameHostForRequestID( |
| int request_id) { |
| if (!current_lock_ || current_lock_->request_id != request_id) |
| return NULL; |
| @@ -65,7 +66,7 @@ ScreenOrientationDispatcherHost::GetRenderFrameHostForRequestID( |
| current_lock_->routing_id); |
| } |
| -void ScreenOrientationDispatcherHost::NotifyLockSuccess(int request_id) { |
| +void ScreenOrientationDispatcherHostImpl::NotifyLockSuccess(int request_id) { |
| RenderFrameHost* render_frame_host = |
| GetRenderFrameHostForRequestID(request_id); |
| if (!render_frame_host) |
| @@ -76,7 +77,7 @@ void ScreenOrientationDispatcherHost::NotifyLockSuccess(int request_id) { |
| ResetCurrentLock(); |
| } |
| -void ScreenOrientationDispatcherHost::NotifyLockError( |
| +void ScreenOrientationDispatcherHostImpl::NotifyLockError( |
| int request_id, blink::WebLockOrientationError error) { |
| RenderFrameHost* render_frame_host = |
| GetRenderFrameHostForRequestID(request_id); |
| @@ -86,7 +87,7 @@ void ScreenOrientationDispatcherHost::NotifyLockError( |
| NotifyLockError(request_id, render_frame_host, error); |
| } |
| -void ScreenOrientationDispatcherHost::NotifyLockError( |
| +void ScreenOrientationDispatcherHostImpl::NotifyLockError( |
| int request_id, |
| RenderFrameHost* render_frame_host, |
| blink::WebLockOrientationError error) { |
| @@ -95,12 +96,12 @@ void ScreenOrientationDispatcherHost::NotifyLockError( |
| ResetCurrentLock(); |
| } |
| -void ScreenOrientationDispatcherHost::OnOrientationChange() { |
| +void ScreenOrientationDispatcherHostImpl::OnOrientationChange() { |
| if (provider_) |
| provider_->OnOrientationChange(); |
| } |
| -void ScreenOrientationDispatcherHost::OnLockRequest( |
| +void ScreenOrientationDispatcherHostImpl::OnLockRequest( |
| RenderFrameHost* render_frame_host, |
| blink::WebScreenOrientationLockType orientation, |
| int request_id) { |
| @@ -122,7 +123,7 @@ void ScreenOrientationDispatcherHost::OnLockRequest( |
| provider_->LockOrientation(request_id, orientation); |
| } |
| -void ScreenOrientationDispatcherHost::OnUnlockRequest( |
| +void ScreenOrientationDispatcherHostImpl::OnUnlockRequest( |
| RenderFrameHost* render_frame_host) { |
| if (current_lock_) { |
| NotifyLockError(current_lock_->request_id, render_frame_host, |