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

Unified Diff: device/vr/vr_service.mojom

Issue 2488273002: Revert of mojo VR interface simplified (Closed)
Patch Set: Created 4 years, 1 month 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 | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/vr/vr_service.mojom
diff --git a/device/vr/vr_service.mojom b/device/vr/vr_service.mojom
index ca297d355fb5779c42a1fe1c9343fbf58ffcd403..5dbf7025641ca0edd5f616e0ca2ba6d4a4f03df3 100644
--- a/device/vr/vr_service.mojom
+++ b/device/vr/vr_service.mojom
@@ -1,7 +1,8 @@
// 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.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
-module device.mojom;
+module device;
// A field of view, given by 4 degrees describing the view from a center point.
struct VRFieldOfView {
@@ -47,46 +48,39 @@
float sizeZ;
};
-struct VRDisplayInfo {
- uint32 index;
- string displayName;
- VRDisplayCapabilities capabilities;
- VRStageParameters? stageParameters;
- VREyeParameters leftEye;
- VREyeParameters rightEye;
+struct VRDisplay {
+ uint32 index;
+ string displayName;
+ VRDisplayCapabilities capabilities;
+ VRStageParameters? stageParameters;
+ VREyeParameters leftEye;
+ VREyeParameters rightEye;
};
struct VRLayerBounds {
- float left;
- float top;
- float width;
- float height;
+ float left;
+ float top;
+ float width;
+ float height;
};
-// TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live.
interface VRService {
- // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceClient
- // so we would never have a half-initialized VRService.
- SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices);
+ SetClient(VRServiceClient client);
+
+ GetDisplays() => (array<VRDisplay> displays);
+ [Sync]
+ GetPose(uint32 index) => (VRPose? pose);
+ ResetPose(uint32 index);
+
+ RequestPresent(uint32 index, bool secureOrigin) => (bool success);
+ ExitPresent(uint32 index);
+ SubmitFrame(uint32 index, VRPose? pose);
+ UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightBounds);
};
interface VRServiceClient {
- OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo);
+ OnDisplayChanged(VRDisplay display);
+ OnExitPresent(uint32 index);
+ OnDisplayConnected(VRDisplay display);
+ OnDisplayDisconnected(uint32 index);
};
-
-interface VRDisplay {
-
- [Sync]
- GetPose() => (VRPose? pose);
- ResetPose();
-
- RequestPresent(bool secureOrigin) => (bool success);
- ExitPresent();
- SubmitFrame(VRPose? pose);
- UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
-};
-
-interface VRDisplayClient {
- OnDisplayChanged(VRDisplayInfo display);
- OnExitPresent();
-};
« no previous file with comments | « device/vr/vr_display_impl.cc ('k') | device/vr/vr_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698