| 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();
|
| };
|
|
|