Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / modules / screen_orientation / ScreenOrientation.idl
1 // Copyright 2014 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
5 enum OrientationLockType {
6     "any",
7     "natural",
8     "landscape",
9     "portrait",
10     "portrait-primary",
11     "portrait-secondary",
12     "landscape-primary",
13     "landscape-secondary"
14 };
15
16 enum OrientationType {
17     "portrait-primary",
18     "portrait-secondary",
19     "landscape-primary",
20     "landscape-secondary"
21 };
22
23 [
24     GarbageCollected,
25     RuntimeEnabled=ScreenOrientation
26 ] interface ScreenOrientation : EventTarget {
27     readonly attribute unsigned short angle;
28     readonly attribute DOMString type;
29
30     [CallWith=ScriptState] Promise lock(OrientationLockType orientation);
31     void unlock();
32
33     attribute EventHandler onchange;
34 };