Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRDisplay.idl

Issue 2754783004: Add UseCounters to evaluate usage and risk with upcoming WebVR spec changes. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // https://w3c.github.io/webvr/#interface-vrdisplay 10 // https://w3c.github.io/webvr/#interface-vrdisplay
11 [ 11 [
12 ActiveScriptWrappable, 12 ActiveScriptWrappable,
13 DependentLifetime, 13 DependentLifetime,
14 OriginTrialEnabled=WebVR 14 OriginTrialEnabled=WebVR
15 ] interface VRDisplay : EventTarget { 15 ] interface VRDisplay : EventTarget {
16 // An identifier for this device unique across VRDisplays. 16 // An identifier for this device unique across VRDisplays.
17 readonly attribute unsigned long displayId; 17 readonly attribute unsigned long displayId;
18 18
19 // A user-readable name identifying the device. 19 // A user-readable name identifying the device.
20 readonly attribute DOMString displayName; 20 [MeasureAs=VRDisplayDisplayName] readonly attribute DOMString displayName;
21 21
22 readonly attribute boolean isConnected; 22 [MeasureAs=VRDisplayIsConnected] readonly attribute boolean isConnected;
23 readonly attribute boolean isPresenting; 23 readonly attribute boolean isPresenting;
24 24
25 // [Constant]? 25 // [Constant]?
26 readonly attribute VRDisplayCapabilities capabilities; 26 readonly attribute VRDisplayCapabilities capabilities;
27 27
28 readonly attribute VRStageParameters stageParameters; 28 readonly attribute VRStageParameters stageParameters;
29 29
30 boolean getFrameData(VRFrameData frameData); 30 boolean getFrameData(VRFrameData frameData);
31 [DeprecateAs=VRDeprecatedGetPose] VRPose getPose(); 31 [DeprecateAs=VRDeprecatedGetPose] VRPose getPose();
32 void resetPose(); 32 [MeasureAs=VRDisplayResetPose] void resetPose();
33 33
34 attribute double depthNear; 34 attribute double depthNear;
35 attribute double depthFar; 35 attribute double depthFar;
36 36
37 VREyeParameters getEyeParameters(VREye whichEye); 37 VREyeParameters getEyeParameters(VREye whichEye);
38 38
39 long requestAnimationFrame(FrameRequestCallback callback); 39 long requestAnimationFrame(FrameRequestCallback callback);
40 void cancelAnimationFrame(long handle); 40 void cancelAnimationFrame(long handle);
41 41
42 // Begin presenting to the VRDisplay. Must be called in response to a user g esture. 42 // Begin presenting to the VRDisplay. Must be called in response to a user g esture.
43 // Repeat calls while already presenting will update the VRLayer being displ ayed. 43 // Repeat calls while already presenting will update the VRLayer being displ ayed.
44 [CallWith=ScriptState] Promise requestPresent(sequence<VRLayer> layers); 44 [CallWith=ScriptState] Promise requestPresent(sequence<VRLayer> layers);
45 45
46 // Stops presenting to the VRDisplay. 46 // Stops presenting to the VRDisplay.
47 [CallWith=ScriptState] Promise exitPresent(); 47 [CallWith=ScriptState] Promise exitPresent();
48 48
49 // Get the sources currently being presented. 49 // Get the sources currently being presented.
50 sequence<VRLayer> getLayers(); 50 sequence<VRLayer> getLayers();
51 51
52 // The VRLayer provided to the `VRDisplay` will be captured and presented 52 // The VRLayer provided to the `VRDisplay` will be captured and presented
53 // 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
54 // 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
55 // created without preserveDrawingBuffer set to true will be cleared. 55 // created without preserveDrawingBuffer set to true will be cleared.
56 void submitFrame(); 56 void submitFrame();
57 }; 57 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698