Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: content/browser/screen_orientation/screen_orientation_dispatcher_host.h

Issue 336153002: Revert of Properly route screen orientation IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_lock_view
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9f328f6c448367a78dd69de3c3171a888e845f47..363c08c6ec13cf17afac14bb43024f4313b21370 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
@@ -5,38 +5,36 @@
#ifndef CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_SCREEN_ORIENTATION_SCREEN_ORIENTATION_DISPATCHER_HOST_H_
-#include "content/public/browser/web_contents_observer.h"
+#include "content/public/browser/browser_message_filter.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 receives lock and unlock requests from the
-// RenderFrames and dispatch them to the ScreenOrientationProvider. It also
-// make sure that the right RenderFrame get replied for each lock request.
+// ScreenOrientationDispatcherHost is a browser filter for Screen Orientation
+// messages and also helps dispatching messages about orientation changes to the
+// renderers.
class CONTENT_EXPORT ScreenOrientationDispatcherHost
- : public WebContentsObserver {
+ : public BrowserMessageFilter {
public:
- explicit ScreenOrientationDispatcherHost(WebContents* web_contents);
- virtual ~ScreenOrientationDispatcherHost();
+ ScreenOrientationDispatcherHost();
- // WebContentsObserver
- virtual bool OnMessageReceived(const IPC::Message&,
- RenderFrameHost* render_frame_host) OVERRIDE;
+ // BrowserMessageFilter
+ virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE;
void OnOrientationChange(blink::WebScreenOrientationType orientation);
void SetProviderForTests(ScreenOrientationProvider* provider);
+ protected:
+ virtual ~ScreenOrientationDispatcherHost();
+
private:
- void OnLockRequest(int* routing_id,
- blink::WebScreenOrientationLockType orientation,
+ void OnLockRequest(blink::WebScreenOrientationLockType orientation,
int request_id);
- void OnUnlockRequest(int* routing_id);
+ void OnUnlockRequest();
static ScreenOrientationProvider* CreateProvider();

Powered by Google App Engine
This is Rietveld 408576698