| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); | 77 SetClient(VRServiceClient client) => (uint32 numberOfConnectedDevices); |
| 78 // Inform the service that the page is listening for vrdisplayactivate events. | 78 // Inform the service that the page is listening for vrdisplayactivate events. |
| 79 SetListeningForActivate(bool listening); | 79 SetListeningForActivate(bool listening); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 interface VRServiceClient { | 82 interface VRServiceClient { |
| 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo
displayInfo); | 83 OnDisplayConnected(VRDisplay display, VRDisplayClient& request, VRDisplayInfo
displayInfo); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 interface VRDisplay { | 86 interface VRDisplay { |
| 87 [Sync] | |
| 88 GetPose() => (VRPose? pose); | |
| 89 ResetPose(); | 87 ResetPose(); |
| 90 | 88 |
| 91 RequestPresent(bool secureOrigin) => (bool success); | 89 RequestPresent(bool secureOrigin) => (bool success); |
| 92 ExitPresent(); | 90 ExitPresent(); |
| 93 SubmitFrame(VRPose? pose); | 91 SubmitFrame(VRPose? pose); |
| 94 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); | 92 UpdateLayerBounds(VRLayerBounds leftBounds, VRLayerBounds rightBounds); |
| 95 }; | 93 }; |
| 96 | 94 |
| 95 interface VRVSyncProviderClient { |
| 96 // VRVSyncProviders should ensure the callback from OnVSync is run before send
ing another OnVSync |
| 97 // to avoid having multiple VSyncs queue up in the case of a slow client. |
| 98 OnVSync(VRPose? pose, double time_seconds) => (); |
| 99 }; |
| 100 |
| 97 interface VRDisplayClient { | 101 interface VRDisplayClient { |
| 98 OnChanged(VRDisplayInfo display); | 102 OnChanged(VRDisplayInfo display); |
| 99 OnExitPresent(); | 103 OnExitPresent(); |
| 100 OnBlur(); | 104 OnBlur(); |
| 101 OnFocus(); | 105 OnFocus(); |
| 102 OnActivate(VRDisplayEventReason reason); | 106 OnActivate(VRDisplayEventReason reason); |
| 103 OnDeactivate(VRDisplayEventReason reason); | 107 OnDeactivate(VRDisplayEventReason reason); |
| 108 OnVRVsyncProviderReady() => (VRVSyncProviderClient client); |
| 104 }; | 109 }; |
| OLD | NEW |