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

Unified Diff: device/screen_orientation/public/interfaces/screen_orientation.mojom

Issue 2688383002: [ScreenOrientation] Merge mojo interface ScreenOrientationListener into ScreenOrientation
Patch Set: Address comments from mlamouri@ Created 3 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: device/screen_orientation/public/interfaces/screen_orientation.mojom
diff --git a/device/screen_orientation/public/interfaces/screen_orientation.mojom b/device/screen_orientation/public/interfaces/screen_orientation.mojom
index c54218843371fb8fb00356a0c42b2c0ab87a4897..d068bcc9c6c1679813c1d2cb00d1f02d7188428e 100644
--- a/device/screen_orientation/public/interfaces/screen_orientation.mojom
+++ b/device/screen_orientation/public/interfaces/screen_orientation.mojom
@@ -6,24 +6,21 @@ module device.mojom;
import "device/screen_orientation/public/interfaces/screen_orientation_lock_types.mojom";
+// {Start,Stop}AccurateListen are expected to be used when the platform requires
+// heavy work in order to accurately know the screen orientation.
+// For example, on Android, this is required for Jelly Bean, where there is no
+// API to be notified of a screen orientation change of 180 degrees.
interface ScreenOrientation {
LockOrientation(ScreenOrientationLockType orientation) =>
(ScreenOrientationLockResult result);
UnlockOrientation();
-};
-// ScreenOrientationListener is expected to be used when the platform requires
-// heavy work in order to accurately know the screen orientation.
-// For example, on Android, this is required for Jelly Bean, where there is no
-// API to be notified of a screen orientation change of 180 degrees.
-interface ScreenOrientationListener {
- // The renderer process is now using the Screen Orientation API and informs
+ // The renderer frame is now using the Screen Orientation API and informs
// the browser process that it should start accurately listening to the screen
// orientation if it wasn't already.
- Start();
-
- // The renderer process is no longer using the Screen Orientation API and
+ StartAccurateListen();
+ // The renderer frame is no longer using the Screen Orientation API and
// informs the browser process that it can stop accurately listening to the
- // screen orientation if no other process cares about it.
- Stop();
+ // screen orientation if no other frame cares about it.
+ StopAccurateListen();
};

Powered by Google App Engine
This is Rietveld 408576698