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

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

Issue 1918143007: Updated Blink WebVR interfaces to WebVR v1 spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webvr_mojo
Patch Set: Fixed layout test Created 4 years, 7 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
(Empty)
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
5 enum VREye {
6 "left",
7 "right"
8 };
9
10 // http://mozvr.github.io/webvr-spec/webvr.html#vrdisplay
11 [
12 RuntimeEnabled=WebVR
13 ] interface VRDisplay {
14 // An identifier for this device unique across VRDisplays.
15 readonly attribute unsigned long displayId;
16
17 // A user-readable name identifying the device.
18 readonly attribute DOMString displayName;
19
20 readonly attribute boolean isConnected;
21 readonly attribute boolean isPresenting;
22
23 // [Constant]?
24 readonly attribute VRDisplayCapabilities capabilities;
25
26 readonly attribute VRStageParameters stageParameters;
27
28 VRPose getPose();
29 VRPose getImmediatePose();
30 void resetPose();
31
32 VREyeParameters getEyeParameters(VREye whichEye);
33
34 long requestAnimationFrame(FrameRequestCallback callback);
35 void cancelAnimationFrame(long handle);
36
37 // Begin presenting to the VRDisplay. Must be called in response to a user g esture.
38 // Repeat calls while already presenting will update the VRLayer being displ ayed.
39 [CallWith=ScriptState] Promise requestPresent(sequence<VRLayer> layers);
40
41 // Stops presenting to the VRDisplay.
42 [CallWith=ScriptState] Promise exitPresent();
43
44 // Get the sources currently being presented.
45 sequence<VRLayer> getLayers();
46
47 // The VRLayer provided to the `VRDisplay` will be captured and presented
48 // in the HMD. Calling this function has the same effect on the source
49 // canvas as any other operation that uses its source image, and canvases
50 // created without preserveDrawingBuffer set to true will be cleared.
51 void submitFrame(optional VRPose pose = null);
52 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRDisplay.cpp ('k') | third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698