Chromium Code Reviews| Index: device/vr/vr_service.mojom |
| diff --git a/device/vr/vr_service.mojom b/device/vr/vr_service.mojom |
| index 5dbf7025641ca0edd5f616e0ca2ba6d4a4f03df3..0dabdfb42184ed654558df6bf61c229afc76931c 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,45 @@ 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; |
| }; |
| 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 { |
|
dcheng
2016/11/10 06:21:58
Btw, I know this class didn't have existing commen
|
|
dcheng
2016/11/10 06:21:58
Nit: no newline
|
| - 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(); |
| }; |