Chromium Code Reviews| Index: content/browser/screen_orientation/screen_orientation_dispatcher_host.h |
| diff --git a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h |
| index 363c08c6ec13cf17afac14bb43024f4313b21370..bafd801cf0b8275b57bd58807ae340a840537298 100644 |
| --- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h |
| +++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h |
| @@ -5,36 +5,38 @@ |
| #ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ |
| #define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_ |
| -#include "content/public/browser/browser_message_filter.h" |
| +#include "content/public/browser/web_contents_observer.h" |
| #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
| #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
| namespace content { |
| +class RenderFrameHost; |
| class ScreenOrientationProvider; |
| +class WebContents; |
| -// ScreenOrientationDispatcherHost is a browser filter for Screen Orientation |
| -// messages and also helps dispatching messages about orientation changes to the |
| -// renderers. |
| +// ScreenOrientationDispatcherHost is receives lock and unlock requests from the |
|
jam
2014/06/11 00:42:49
nit: grammer ("is receives")
mlamouri (slow - plz ping)
2014/06/16 14:11:54
Done.
|
| +// RenderFrames and dispatch them to the ScreenOrientationProvider. It also |
| +// make sure that the right RenderFrame get replied for each lock request. |
| class CONTENT_EXPORT ScreenOrientationDispatcherHost |
| - : public BrowserMessageFilter { |
| + : public WebContentsObserver { |
| public: |
| - ScreenOrientationDispatcherHost(); |
| + explicit ScreenOrientationDispatcherHost(WebContents* web_contents); |
| + virtual ~ScreenOrientationDispatcherHost(); |
| - // BrowserMessageFilter |
| - virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE; |
| + // WebContentsObserver |
| + virtual bool OnMessageReceived(const IPC::Message&, |
| + RenderFrameHost* render_frame_host) OVERRIDE; |
| void OnOrientationChange(blink::WebScreenOrientationType orientation); |
| void SetProviderForTests(ScreenOrientationProvider* provider); |
| - protected: |
| - virtual ~ScreenOrientationDispatcherHost(); |
| - |
| private: |
| - void OnLockRequest(blink::WebScreenOrientationLockType orientation, |
| + void OnLockRequest(RenderFrameHost* render_frame_host, |
| + blink::WebScreenOrientationLockType orientation, |
| int request_id); |
| - void OnUnlockRequest(); |
| + void OnUnlockRequest(RenderFrameHost* render_frame_host); |
| static ScreenOrientationProvider* CreateProvider(); |