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

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

Issue 398013002: Poll for Display rotation on Android 4.0 and 4.1 when needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: call ScreenOrientationListener on UI thread Created 6 years, 4 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_provider_android.h
diff --git a/content/browser/screen_orientation/screen_orientation_provider_android.h b/content/browser/screen_orientation/screen_orientation_provider_android.h
index eac7cce8537cbfcce32f44deb17a3c67c5e8a2a1..9b88386afab1e611732ff026c2fd3a44117d9751 100644
--- a/content/browser/screen_orientation/screen_orientation_provider_android.h
+++ b/content/browser/screen_orientation/screen_orientation_provider_android.h
@@ -33,6 +33,16 @@ class ScreenOrientationProviderAndroid : public ScreenOrientationProvider,
// WebContentsObserver
virtual void DidToggleFullscreenModeForTab(bool entered_fullscreen) OVERRIDE;
+ // Ask the ScreenOrientationListener (Java) to start accurately listening to
+ // the screen orientation. It keep track of the number of start request if it
+ // is already running an accurate listening.
+ static void StartAccurateListening();
+
+ // Ask the ScreenOrientationListener (Java) to stop accurately listening to
+ // the screen orientation. It will actually stop only if the number of stop
+ // requests matches the number of start requests.
+ static void StopAccurateListening();
+
private:
WebContentsImpl* web_contents_impl();

Powered by Google App Engine
This is Rietveld 408576698