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..e4b2805ea761717fd416785afb5342741361ff09 100644 |
| --- a/device/vr/vr_service.mojom |
| +++ b/device/vr/vr_service.mojom |
| @@ -57,6 +57,11 @@ struct VRDisplay { |
| VREyeParameters rightEye; |
| }; |
| +struct VRDisplayWithService { |
| + VRDisplay? display; |
|
leonhsl(Using Gerrit)
2016/10/17 09:03:29
Does it make sense when VRDisplay is null? For wha
|
| + VRDeviceService? service; |
|
leonhsl(Using Gerrit)
2016/10/17 09:03:29
Same question with above, what scenario for the nu
shaobo.yan
2016/10/18 01:10:48
The VRDisplay should not be nullptr but the VRDevi
|
| +}; |
| + |
| struct VRLayerBounds { |
| float left; |
| float top; |
| @@ -65,22 +70,26 @@ struct VRLayerBounds { |
| }; |
| interface VRService { |
| - SetClient(VRServiceClient client); |
| + GetDisplays() => (array<VRDisplayWithService> displays); |
| +}; |
| + |
| +interface VRDeviceService { |
|
leonhsl(Using Gerrit)
2016/10/17 09:03:29
We should avoid such interface naming as XXXServic
shaobo.yan
2016/10/18 01:10:48
Oh, thx for the info ! We already have a class nam
leonhsl(Using Gerrit)
2016/10/18 07:12:10
You could change 'module device' to 'module device
|
| + RegisterDisplayService(VRDisplayService display_service); |
| - 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 { |
| +//NOTE: this interface will be held by each VRDevice and VRDisplay pair. |
| +interface VRDisplayService { |
|
leonhsl(Using Gerrit)
2016/10/17 09:03:29
Naming change: to 'VRDisplay' or 'VRDeviceClient'
shaobo.yan
2016/10/18 01:10:48
This interface is used by VRDevice to inform event
|
| OnDisplayChanged(VRDisplay display); |
| - OnExitPresent(uint32 index); |
| + OnExitPresent(); |
| OnDisplayConnected(VRDisplay display); |
| - OnDisplayDisconnected(uint32 index); |
| + OnDisplayDisconnected(); |
| }; |