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

Unified Diff: device/vr/vr_service.mojom

Issue 2420743003: mojo VR interface simplified (Closed)
Patch Set: address leon@ comments about name Created 4 years, 2 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: device/vr/vr_service.mojom
diff --git a/device/vr/vr_service.mojom b/device/vr/vr_service.mojom
index 5dbf7025641ca0edd5f616e0ca2ba6d4a4f03df3..550fabf1b8c3d773d09a21a73d494958452523e7 100644
--- a/device/vr/vr_service.mojom
+++ b/device/vr/vr_service.mojom
@@ -1,8 +1,7 @@
// 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;
+module device.mojom;
// A field of view, given by 4 degrees describing the view from a center point.
struct VRFieldOfView {
@@ -49,7 +48,6 @@ struct VRStageParameters {
};
struct VRDisplay {
- uint32 index;
string displayName;
VRDisplayCapabilities capabilities;
VRStageParameters? stageParameters;
@@ -65,22 +63,32 @@ struct VRLayerBounds {
};
interface VRService {
+ GetDisplays() => (bool success);
SetClient(VRServiceClient client);
+};
- GetDisplays() => (array<VRDisplay> displays);
+interface VRServiceClient {
[Sync]
- GetPose(uint32 index) => (VRPose? pose);
- ResetPose(uint32 index);
+ GetDisplayClient() => (VRDisplayClient? client);
+};
- RequestPresent(uint32 index, bool secureOrigin) => (bool success);
- ExitPresent(uint32 index);
- SubmitFrame(uint32 index, VRPose? pose);
- UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightBounds);
+interface VRDevice {
+ [Sync]
+ GetPose() => (VRPose? pose);
+ ResetPose();
+
+ RequestPresent(bool secureOrigin) => (bool success);
+ ExitPresent();
+ SubmitFrame(VRPose? pose);
+ UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
};
-interface VRServiceClient {
+interface VRDisplayClient {
+ RegisterDevice(VRDevice? device_client);
+ UpdateDisplayInfo(VRDisplay display);
+
OnDisplayChanged(VRDisplay display);
- OnExitPresent(uint32 index);
+ OnExitPresent();
OnDisplayConnected(VRDisplay display);
- OnDisplayDisconnected(uint32 index);
+ OnDisplayDisconnected();
};

Powered by Google App Engine
This is Rietveld 408576698