| Index: content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
|
| diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
|
| index a27890e71e99c46e987fc47428bbf3dc1551d97f..3bb494d93f900109ee2ed43fb84bcbf79c943951 100644
|
| --- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
|
| +++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.cc
|
| @@ -6,14 +6,11 @@
|
|
|
| #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/web_contents.h"
|
|
|
| namespace content {
|
|
|
| -ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost(
|
| - WebContents* web_contents)
|
| - : WebContentsObserver(web_contents) {
|
| +ScreenOrientationDispatcherHost::ScreenOrientationDispatcherHost()
|
| + : BrowserMessageFilter(ScreenOrientationMsgStart) {
|
| if (!provider_.get())
|
| provider_.reset(CreateProvider());
|
| }
|
| @@ -22,13 +19,10 @@
|
| }
|
|
|
| bool ScreenOrientationDispatcherHost::OnMessageReceived(
|
| - const IPC::Message& message,
|
| - RenderFrameHost* render_frame_host) {
|
| + const IPC::Message& message) {
|
| bool handled = true;
|
|
|
| - int routing_id = message.routing_id();
|
| - IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(ScreenOrientationDispatcherHost, message,
|
| - &routing_id)
|
| + IPC_BEGIN_MESSAGE_MAP(ScreenOrientationDispatcherHost, message)
|
| IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_LockRequest, OnLockRequest)
|
| IPC_MESSAGE_HANDLER(ScreenOrientationHostMsg_Unlock, OnUnlockRequest)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| @@ -48,28 +42,24 @@
|
| }
|
|
|
| void ScreenOrientationDispatcherHost::OnLockRequest(
|
| - int* routing_id,
|
| blink::WebScreenOrientationLockType orientation,
|
| int request_id) {
|
| if (!provider_) {
|
| Send(new ScreenOrientationMsg_LockError(
|
| - *routing_id,
|
| - request_id,
|
| - blink::WebLockOrientationCallback::ErrorTypeNotAvailable));
|
| + request_id,
|
| + blink::WebLockOrientationCallback::ErrorTypeNotAvailable));
|
| return;
|
| }
|
|
|
| // TODO(mlamouri): pass real values.
|
| Send(new ScreenOrientationMsg_LockSuccess(
|
| - *routing_id,
|
| - request_id,
|
| - 0,
|
| - blink::WebScreenOrientationPortraitPrimary));
|
| + request_id,
|
| + 0,
|
| + blink::WebScreenOrientationPortraitPrimary));
|
| provider_->LockOrientation(orientation);
|
| }
|
|
|
| -void ScreenOrientationDispatcherHost::OnUnlockRequest(
|
| - int* routing_id) {
|
| +void ScreenOrientationDispatcherHost::OnUnlockRequest() {
|
| if (!provider_.get())
|
| return;
|
|
|
|
|