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

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: 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
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() { }
+
abarth-chromium 2014/07/16 17:12:17 The way we've done this for other APIs is to set a
protected:
virtual ~Platform() { }

Powered by Google App Engine
This is Rietveld 408576698