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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 module device.mojom; 5 module device.mojom;
6 6
7 import "device/screen_orientation/public/interfaces/screen_orientation_lock_type s.mojom"; 7 import "device/screen_orientation/public/interfaces/screen_orientation_lock_type s.mojom";
8 8
9 // {Start,Stop}AccurateListen are expected to be used when the platform requires
10 // heavy work in order to accurately know the screen orientation.
11 // For example, on Android, this is required for Jelly Bean, where there is no
12 // API to be notified of a screen orientation change of 180 degrees.
9 interface ScreenOrientation { 13 interface ScreenOrientation {
10 LockOrientation(ScreenOrientationLockType orientation) => 14 LockOrientation(ScreenOrientationLockType orientation) =>
11 (ScreenOrientationLockResult result); 15 (ScreenOrientationLockResult result);
12 UnlockOrientation(); 16 UnlockOrientation();
13 };
14 17
15 // ScreenOrientationListener is expected to be used when the platform requires 18 // The renderer frame is now using the Screen Orientation API and informs
16 // heavy work in order to accurately know the screen orientation.
17 // For example, on Android, this is required for Jelly Bean, where there is no
18 // API to be notified of a screen orientation change of 180 degrees.
19 interface ScreenOrientationListener {
20 // The renderer process is now using the Screen Orientation API and informs
21 // the browser process that it should start accurately listening to the screen 19 // the browser process that it should start accurately listening to the screen
22 // orientation if it wasn't already. 20 // orientation if it wasn't already.
23 Start(); 21 StartAccurateListen();
24 22 // The renderer frame is no longer using the Screen Orientation API and
25 // The renderer process is no longer using the Screen Orientation API and
26 // informs the browser process that it can stop accurately listening to the 23 // informs the browser process that it can stop accurately listening to the
27 // screen orientation if no other process cares about it. 24 // screen orientation if no other frame cares about it.
28 Stop(); 25 StopAccurateListen();
29 }; 26 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698