| 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module device.mojom; | 5 module device.mojom; |
| 6 | 6 |
| 7 import "mojo/common/time.mojom"; | 7 import "mojo/common/time.mojom"; |
| 8 | 8 |
| 9 // A field of view, given by 4 degrees describing the view from a center point. | 9 // A field of view, given by 4 degrees describing the view from a center point. |
| 10 struct VRFieldOfView { | 10 struct VRFieldOfView { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 RequestPresent(bool secureOrigin) => (bool success); | 91 RequestPresent(bool secureOrigin) => (bool success); |
| 92 ExitPresent(); | 92 ExitPresent(); |
| 93 SubmitFrame(VRPose? pose); | 93 SubmitFrame(VRPose? pose); |
| 94 UpdateLayerBounds(int16 frameId, VRLayerBounds leftBounds, | 94 UpdateLayerBounds(int16 frameId, VRLayerBounds leftBounds, |
| 95 VRLayerBounds rightBounds); | 95 VRLayerBounds rightBounds); |
| 96 GetVRVSyncProvider(VRVSyncProvider& request); | 96 GetVRVSyncProvider(VRVSyncProvider& request); |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 interface VRVSyncProvider { | 99 interface VRVSyncProvider { |
| 100 enum Status { SUCCESS, RETRY }; |
| 101 |
| 100 // The frameId maps a VSync to a frame arriving from the compositor. IDs will | 102 // The frameId maps a VSync to a frame arriving from the compositor. IDs will |
| 101 // be reused after the frame arrives from the compositor. Negative IDs imply | 103 // be reused after the frame arrives from the compositor. Negative IDs imply |
| 102 // no mapping. | 104 // no mapping. |
| 103 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId); | 105 GetVSync() => (VRPose? pose, mojo.common.mojom.TimeDelta time, int16 frameId, |
| 106 Status status); |
| 104 }; | 107 }; |
| 105 | 108 |
| 106 interface VRDisplayClient { | 109 interface VRDisplayClient { |
| 107 OnChanged(VRDisplayInfo display); | 110 OnChanged(VRDisplayInfo display); |
| 108 OnExitPresent(); | 111 OnExitPresent(); |
| 109 OnBlur(); | 112 OnBlur(); |
| 110 OnFocus(); | 113 OnFocus(); |
| 111 OnActivate(VRDisplayEventReason reason); | 114 OnActivate(VRDisplayEventReason reason); |
| 112 OnDeactivate(VRDisplayEventReason reason); | 115 OnDeactivate(VRDisplayEventReason reason); |
| 113 }; | 116 }; |
| OLD | NEW |