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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/vr/VRDisplay.idl
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.idl b/third_party/WebKit/Source/modules/vr/VRDisplay.idl
new file mode 100644
index 0000000000000000000000000000000000000000..e4e2f1952422956b96e03da81188617105caf82c
--- /dev/null
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.idl
@@ -0,0 +1,52 @@
+// Copyright 2016 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 VREye {
+ "left",
+ "right"
+};
+
+// http://mozvr.github.io/webvr-spec/webvr.html#vrdisplay
+[
+ RuntimeEnabled=WebVR
+] interface VRDisplay {
+ // An identifier for this device unique across VRDisplays.
+ readonly attribute unsigned long displayId;
+
+ // A user-readable name identifying the device.
+ readonly attribute DOMString displayName;
+
+ readonly attribute boolean isConnected;
+ readonly attribute boolean isPresenting;
+
+ // [Constant]?
+ readonly attribute VRDisplayCapabilities capabilities;
+
+ readonly attribute VRStageParameters stageParameters;
+
+ VRPose getPose();
+ VRPose getImmediatePose();
+ void resetPose();
+
+ VREyeParameters getEyeParameters(VREye whichEye);
+
+ long requestAnimationFrame(FrameRequestCallback callback);
+ void cancelAnimationFrame(long handle);
+
+ // Begin presenting to the VRDisplay. Must be called in response to a user gesture.
+ // Repeat calls while already presenting will update the VRLayer being displayed.
+ [CallWith=ScriptState] Promise requestPresent(sequence<VRLayer> layers);
+
+ // Stops presenting to the VRDisplay.
+ [CallWith=ScriptState] Promise exitPresent();
+
+ // Get the sources currently being presented.
+ sequence<VRLayer> getLayers();
+
+ // The VRLayer provided to the `VRDisplay` will be captured and presented
+ // in the HMD. Calling this function has the same effect on the source
+ // canvas as any other operation that uses its source image, and canvases
+ // created without preserveDrawingBuffer set to true will be cleared.
+ void submitFrame(optional VRPose pose = null);
+};
« 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