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

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: with tests 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
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..45ec7164fa59dd1b1b0d8ddc4b2962817cc21d85 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,9 +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);
};

Powered by Google App Engine
This is Rietveld 408576698