| 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 { |
| 11 float upDegrees; | 11 float upDegrees; |
| 12 float downDegrees; | 12 float downDegrees; |
| 13 float leftDegrees; | 13 float leftDegrees; |
| 14 float rightDegrees; | 14 float rightDegrees; |
| 15 }; | 15 }; |
| 16 | 16 |
| 17 // A display's position, orientation, velocity, and acceleration state at the | 17 // A display's position, orientation, velocity, and acceleration state at the |
| 18 // given timestamp. | 18 // given timestamp. |
| 19 struct VRPose { | 19 struct VRPose { |
| 20 double timestamp; | |
| 21 array<float, 4>? orientation; | 20 array<float, 4>? orientation; |
| 22 array<float, 3>? position; | 21 array<float, 3>? position; |
| 23 array<float, 3>? angularVelocity; | 22 array<float, 3>? angularVelocity; |
| 24 array<float, 3>? linearVelocity; | 23 array<float, 3>? linearVelocity; |
| 25 array<float, 3>? angularAcceleration; | 24 array<float, 3>? angularAcceleration; |
| 26 array<float, 3>? linearAcceleration; | 25 array<float, 3>? linearAcceleration; |
| 27 }; | 26 }; |
| 28 | 27 |
| 29 struct VRDisplayCapabilities { | 28 struct VRDisplayCapabilities { |
| 30 bool hasOrientation; | 29 bool hasOrientation; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 }; | 106 }; |
| 108 | 107 |
| 109 interface VRDisplayClient { | 108 interface VRDisplayClient { |
| 110 OnChanged(VRDisplayInfo display); | 109 OnChanged(VRDisplayInfo display); |
| 111 OnExitPresent(); | 110 OnExitPresent(); |
| 112 OnBlur(); | 111 OnBlur(); |
| 113 OnFocus(); | 112 OnFocus(); |
| 114 OnActivate(VRDisplayEventReason reason); | 113 OnActivate(VRDisplayEventReason reason); |
| 115 OnDeactivate(VRDisplayEventReason reason); | 114 OnDeactivate(VRDisplayEventReason reason); |
| 116 }; | 115 }; |
| OLD | NEW |