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
3// found in the LICENSE file.
4
5module device.mojom;
6
7import "services/device/public/mojom/screen_orientation_lock_types.mojom";
8
9interface ScreenOrientation {
10  LockOrientation(ScreenOrientationLockType orientation) =>
11    (ScreenOrientationLockResult result);
12  UnlockOrientation();
13};
14
15// NOTE: this could probably be merged with `ScreenOrientation`. It used to be a
16// separate service for Android Jelly Bean devices.
17interface ScreenOrientationListener {
18  // Queries whether accelerometer auto rotation of screen orientation is
19  // enabled, or the user has locked the screen orientation at the OS level.
20  // This can be called at any time, whether or not the listener is started.
21  // It's currently only implemented on Android.
22  IsAutoRotateEnabledByUser() => (bool enabled);
23};
24