diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl')
-rw-r--r-- | chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl b/chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl new file mode 100644 index 00000000000..c1bf5328359 --- /dev/null +++ b/chromium/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.idl @@ -0,0 +1,30 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +enum OrientationType { + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" +}; + +enum OrientationLockType { + "any", + "landscape", + "portrait", + "portrait-primary", + "portrait-secondary", + "landscape-primary", + "landscape-secondary" +}; + +[ + RuntimeEnabled=ScreenOrientation +] partial interface Screen { + readonly attribute OrientationType orientation; + + [CallWith=ScriptState] Promise lockOrientation(OrientationLockType orientation); + + void unlockOrientation(); +}; |