OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be // fou nd in the LICENSE file. | 2 // Use of this source code is governed by a BSD-style license that can be // fou nd in the LICENSE file. |
3 | 3 |
4 module device.mojom; | 4 module device.mojom; |
5 | 5 |
6 // A field of view, given by 4 degrees describing the view from a center point. | 6 // A field of view, given by 4 degrees describing the view from a center point. |
7 struct VRFieldOfView { | 7 struct VRFieldOfView { |
8 float upDegrees; | 8 float upDegrees; |
9 float downDegrees; | 9 float downDegrees; |
10 float leftDegrees; | 10 float leftDegrees; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 NAVIGATION = 1, | 68 NAVIGATION = 1, |
69 MOUNTED = 2, | 69 MOUNTED = 2, |
70 UNMOUNTED = 3 | 70 UNMOUNTED = 3 |
71 }; | 71 }; |
72 | 72 |
73 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live. | 73 // TODO(shaobo.yan@intel.com) : Add comments to describe these interfaces about how to use and where they live. |
74 interface VRService { | 74 interface VRService { |
75 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient | 75 // TODO(shaobo.yan@intel.com) : Use a factory function which took a VRServiceC lient |
76 // so we would never have a half-initialized VRService. | 76 // so we would never have a half-initialized VRService. |
77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); | 77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); |
78 SetListeningForActivate(bool listening); | |
dcheng
2016/11/17 19:08:04
Please add a comment for the new interface method.
bajones
2016/11/17 19:23:28
Done
| |
78 }; | 79 }; |
79 | 80 |
80 interface VRServiceClient { | 81 interface VRServiceClient { |
81 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); | 82 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo displayInfo); |
82 }; | 83 }; |
83 | 84 |
84 interface VRDisplay { | 85 interface VRDisplay { |
85 [Sync] | 86 [Sync] |
86 GetPose() => (VRPose? pose); | 87 GetPose() => (VRPose? pose); |
87 ResetPose(); | 88 ResetPose(); |
88 | 89 |
89 RequestPresent(bool secureOrigin) => (bool success); | 90 RequestPresent(bool secureOrigin) => (bool success); |
90 ExitPresent(); | 91 ExitPresent(); |
91 SubmitFrame(VRPose? pose); | 92 SubmitFrame(VRPose? pose); |
92 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); | 93 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); |
93 }; | 94 }; |
94 | 95 |
95 interface VRDisplayClient { | 96 interface VRDisplayClient { |
96 OnChanged(VRDisplayInfo display); | 97 OnChanged(VRDisplayInfo display); |
97 OnExitPresent(); | 98 OnExitPresent(); |
98 OnBlur(); | 99 OnBlur(); |
99 OnFocus(); | 100 OnFocus(); |
100 OnActivate(VRDisplayEventReason reason); | 101 OnActivate(VRDisplayEventReason reason); |
101 OnDeactivate(VRDisplayEventReason reason); | 102 OnDeactivate(VRDisplayEventReason reason); |
102 }; | 103 }; |
OLD | NEW |