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

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

Issue 177793003: Chromium plumbing for Screen Orientation API lock/unlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chromium_plumbing_screen_orientation
Patch Set: fix compilation issue Created 6 years, 10 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
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 75620d9738d7db0959f6d2e47d2831960954fade..383a61b5b4c4156b1ff6ed93227b56c891a45b82 100644
--- a/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
+++ b/content/browser/screen_orientation/screen_orientation_dispatcher_host.h
@@ -10,8 +10,13 @@
namespace content {
-// ScreenOrientationDispatcherHost
-class ScreenOrientationDispatcherHost : public BrowserMessageFilter {
+class ScreenOrientationProvider;
+
+// 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 BrowserMessageFilter {
public:
ScreenOrientationDispatcherHost();
@@ -20,8 +25,17 @@ class ScreenOrientationDispatcherHost : public BrowserMessageFilter {
void OnOrientationChange(blink::WebScreenOrientation orientation);
-private:
- virtual ~ScreenOrientationDispatcherHost() {}
+ void SetProviderForTests(ScreenOrientationProvider* provider);
+
+ private:
+ virtual ~ScreenOrientationDispatcherHost();
+
+ void OnLockRequest(blink::WebScreenOrientations orientations);
+ void OnUnlockRequest();
+
+ static ScreenOrientationProvider* CreateProvider();
+
+ scoped_ptr<ScreenOrientationProvider> provider_;
DISALLOW_COPY_AND_ASSIGN(ScreenOrientationDispatcherHost);
};
« no previous file with comments | « no previous file | content/browser/screen_orientation/screen_orientation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698