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

Unified Diff: public/platform/Platform.h

Issue 398003002: Add start/stop listening Platform methods for Screen Orientation. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: apply review comments Created 6 years, 5 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 | « Source/modules/screen_orientation/ScreenOrientationController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/Platform.h
diff --git a/public/platform/Platform.h b/public/platform/Platform.h
index 259143d042d95541d8b18bded3782dbfab592196..8e21b6d4cfedc1e62bb23bda388aee50a2463cff 100644
--- a/public/platform/Platform.h
+++ b/public/platform/Platform.h
@@ -640,6 +640,23 @@ public:
virtual WebNotificationPresenter* notificationPresenter() { return 0; }
+ // Screen Orientation -------------------------------------------------
+
+ // Informs the platform that if it requires a specific observer to run in
+ // order to know the screen orientation accurately, it should be started.
+ // This call is expected to happen as soon as a WebFrame starts using the
+ // Screen Orientation API.
+ // Most implementations are expected to do nothing.
+ virtual void startScreenOrientationListening() { }
+
+ // Informs the platform that if it requires a specific observer to run in
+ // order to know the screen orientation, it can be stopped.
+ // This call is expected to happen as soon as a WebFrame using the Screen
+ // Orientation no longer uses it. It is up to the platform to make sure that
+ // no other consumers are still expecting accurate values.
+ // Most implementations are expected to do nothing.
+ virtual void stopScreenOrientationListening() { }
+
protected:
virtual ~Platform() { }
« no previous file with comments | « Source/modules/screen_orientation/ScreenOrientationController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698