| 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 enum VREye { | 5 enum VREye { |
| 6 "left", | 6 "left", |
| 7 "right" | 7 "right" |
| 8 }; | 8 }; |
| 9 | 9 |
| 10 // http://mozvr.github.io/webvr-spec/webvr.html#vrdisplay | 10 // http://mozvr.github.io/webvr-spec/webvr.html#vrdisplay |
| 11 [ | 11 [ |
| 12 ActiveScriptWrappable, |
| 13 DependentLifetime, |
| 12 OriginTrialEnabled=WebVR | 14 OriginTrialEnabled=WebVR |
| 13 ] interface VRDisplay { | 15 ] interface VRDisplay : EventTarget { |
| 14 // An identifier for this device unique across VRDisplays. | 16 // An identifier for this device unique across VRDisplays. |
| 15 readonly attribute unsigned long displayId; | 17 readonly attribute unsigned long displayId; |
| 16 | 18 |
| 17 // A user-readable name identifying the device. | 19 // A user-readable name identifying the device. |
| 18 readonly attribute DOMString displayName; | 20 readonly attribute DOMString displayName; |
| 19 | 21 |
| 20 readonly attribute boolean isConnected; | 22 readonly attribute boolean isConnected; |
| 21 readonly attribute boolean isPresenting; | 23 readonly attribute boolean isPresenting; |
| 22 | 24 |
| 23 // [Constant]? | 25 // [Constant]? |
| (...skipping 22 matching lines...) Expand all Loading... |
| 46 | 48 |
| 47 // Get the sources currently being presented. | 49 // Get the sources currently being presented. |
| 48 sequence<VRLayer> getLayers(); | 50 sequence<VRLayer> getLayers(); |
| 49 | 51 |
| 50 // The VRLayer provided to the `VRDisplay` will be captured and presented | 52 // The VRLayer provided to the `VRDisplay` will be captured and presented |
| 51 // in the HMD. Calling this function has the same effect on the source | 53 // in the HMD. Calling this function has the same effect on the source |
| 52 // canvas as any other operation that uses its source image, and canvases | 54 // canvas as any other operation that uses its source image, and canvases |
| 53 // created without preserveDrawingBuffer set to true will be cleared. | 55 // created without preserveDrawingBuffer set to true will be cleared. |
| 54 void submitFrame(); | 56 void submitFrame(); |
| 55 }; | 57 }; |
| OLD | NEW |