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

Unified Diff: device/vr/vr_service.mojom

Issue 2494733002: Reland of mojo VR interface simpified. (Closed)
Patch Set: Fix Werror 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 5dbf7025641ca0edd5f616e0ca2ba6d4a4f03df3..ca297d355fb5779c42a1fe1c9343fbf58ffcd403 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 {
@@ -48,39 +47,46 @@ struct VRStageParameters {
float sizeZ;
};
-struct VRDisplay {
- uint32 index;
- string displayName;
- VRDisplayCapabilities capabilities;
- VRStageParameters? stageParameters;
- VREyeParameters leftEye;
- VREyeParameters rightEye;
+struct VRDisplayInfo {
+ 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 {
- SetClient(VRServiceClient client);
+ // 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);
+};
+
+interface VRServiceClient {
+ OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo);
+};
+
+interface VRDisplay {
- GetDisplays() => (array<VRDisplay> displays);
[Sync]
- GetPose(uint32 index) => (VRPose? pose);
- ResetPose(uint32 index);
+ GetPose() => (VRPose? pose);
+ ResetPose();
- RequestPresent(uint32 index, bool secureOrigin) => (bool success);
- ExitPresent(uint32 index);
- SubmitFrame(uint32 index, VRPose? pose);
- UpdateLayerBounds(uint32 index, VRLayerBounds leftBounds, VRLayerBounds rightBounds);
+ RequestPresent(bool secureOrigin) => (bool success);
+ ExitPresent();
+ SubmitFrame(VRPose? pose);
+ UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds);
};
-interface VRServiceClient {
- OnDisplayChanged(VRDisplay display);
- OnExitPresent(uint32 index);
- OnDisplayConnected(VRDisplay display);
- OnDisplayDisconnected(uint32 index);
+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