| // Copyright 2016 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module device.mojom; |
| |
| import "services/device/public/mojom/screen_orientation_lock_types.mojom"; |
| |
| interface ScreenOrientation { |
| LockOrientation(ScreenOrientationLockType orientation) => |
| (ScreenOrientationLockResult result); |
| UnlockOrientation(); |
| }; |
| |
| // NOTE: this could probably be merged with `ScreenOrientation`. It used to be a |
| // separate service for Android Jelly Bean devices. |
| interface ScreenOrientationListener { |
| // Queries whether accelerometer auto rotation of screen orientation is |
| // enabled, or the user has locked the screen orientation at the OS level. |
| // This can be called at any time, whether or not the listener is started. |
| // It's currently only implemented on Android. |
| IsAutoRotateEnabledByUser() => (bool enabled); |
| }; |