Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 interface ScreenOrientation { | 9 interface ScreenOrientation { |
| 10 LockOrientation(ScreenOrientationLockType orientation) => | 10 LockOrientation(ScreenOrientationLockType orientation) => |
| 11 (ScreenOrientationLockResult result); | 11 (ScreenOrientationLockResult result); |
| 12 UnlockOrientation(); | 12 UnlockOrientation(); |
| 13 }; | 13 }; |
| 14 | |
| 15 // ScreenOrientationAccurate is expected to be used when the platform requires | |
| 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 ScreenOrientationAccurate { | |
|
blundell
2016/12/20 13:39:18
I suggest we rename this ScreenOrientationListener
leonhsl(Using Gerrit)
2016/12/21 02:48:36
Done.
| |
| 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 | |
| 22 // orientation if it wasn't already. | |
| 23 StartListening(); | |
|
blundell
2016/12/20 13:39:18
We can rename these to Start and Stop. So we'll ha
leonhsl(Using Gerrit)
2016/12/21 02:48:36
Done.
| |
| 24 | |
| 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 | |
| 27 // screen orientation if no other process cares about it. | |
| 28 StopListening(); | |
| 29 }; | |
| OLD | NEW |