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

Unified Diff: content/common/vr_service.mojom

Issue 829803003: Adding Chrome-side WebVR interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed one cardboard reference Created 5 years, 6 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
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/vr_service.mojom
diff --git a/content/common/vr_service.mojom b/content/common/vr_service.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..2d81ec70a11571e6758028b0ea075ffeb7f726d0
--- /dev/null
+++ b/content/common/vr_service.mojom
@@ -0,0 +1,73 @@
+// Copyright 2015 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.
+
+module content;
+
+struct VRVector3 {
+ float x;
+ float y;
+ float z;
+};
+
+struct VRVector4 {
+ float x;
+ float y;
+ float z;
+ float w;
+};
+
+struct VRRect {
+ int32 x;
+ int32 y;
+ int32 width;
+ int32 height;
+};
+
+// A field of view, given by 4 degrees describing the view from a center point.
+struct VRFieldOfView {
+ float upDegrees;
+ float downDegrees;
+ float leftDegrees;
+ float rightDegrees;
+};
+
+// A sensor's position, orientation, velocity, and acceleration state at the
+// given timestamp.
+struct VRSensorState {
+ double timestamp;
+ uint32 frameIndex;
+ VRVector4? orientation;
+ VRVector3? position;
+ VRVector3? angularVelocity;
+ VRVector3? linearVelocity;
+ VRVector3? angularAcceleration;
+ VRVector3? linearAcceleration;
+};
+
+// Information about the optical properties for an eye in an HMD.
+struct VREyeParameters {
+ VRFieldOfView minimumFieldOfView;
+ VRFieldOfView maximumFieldOfView;
+ VRFieldOfView recommendedFieldOfView;
+ VRVector3 eyeTranslation;
+ VRRect renderRect;
+};
+
+// Information pertaining to Head Mounted Displays.
+struct VRHMDInfo {
+ VREyeParameters leftEye;
+ VREyeParameters rightEye;
+};
+
+struct VRDeviceInfo {
+ uint32 index;
+ string deviceName;
+ VRHMDInfo? hmdInfo;
+};
+
+interface VRService {
+ GetDevices() => (array<VRDeviceInfo> devices);
+ GetSensorState(uint32 index) => (VRSensorState state);
+ ResetSensor(uint32 index);
+};
« no previous file with comments | « content/common/BUILD.gn ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698