OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef VRDisplay_h | 5 #ifndef VRDisplay_h |
6 #define VRDisplay_h | 6 #define VRDisplay_h |
7 | 7 |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/FrameRequestCallback.h" | 9 #include "core/dom/FrameRequestCallback.h" |
10 #include "core/events/EventTarget.h" | 10 #include "core/events/EventTarget.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 // VRDisplayClient | 125 // VRDisplayClient |
126 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; | 126 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; |
127 void OnExitPresent() override; | 127 void OnExitPresent() override; |
128 void OnBlur() override; | 128 void OnBlur() override; |
129 void OnFocus() override; | 129 void OnFocus() override; |
130 void OnActivate(device::mojom::blink::VRDisplayEventReason) override; | 130 void OnActivate(device::mojom::blink::VRDisplayEventReason) override; |
131 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; | 131 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; |
132 | 132 |
133 void OnVSync(device::mojom::blink::VRPosePtr, | 133 void OnVSync(device::mojom::blink::VRPosePtr, |
134 mojo::common::mojom::blink::TimeDeltaPtr); | 134 mojo::common::mojom::blink::TimeDeltaPtr, |
| 135 int16_t frameId); |
135 void ConnectVSyncProvider(); | 136 void ConnectVSyncProvider(); |
136 | 137 |
137 ScriptedAnimationController& ensureScriptedAnimationController(Document*); | 138 ScriptedAnimationController& ensureScriptedAnimationController(Document*); |
138 | 139 |
139 Member<NavigatorVR> m_navigatorVR; | 140 Member<NavigatorVR> m_navigatorVR; |
140 unsigned m_displayId = 0; | 141 unsigned m_displayId = 0; |
141 String m_displayName; | 142 String m_displayName; |
142 bool m_isConnected = false; | 143 bool m_isConnected = false; |
143 bool m_isPresenting = false; | 144 bool m_isPresenting = false; |
144 bool m_isValidDeviceForPresenting = true; | 145 bool m_isValidDeviceForPresenting = true; |
145 Member<VRDisplayCapabilities> m_capabilities; | 146 Member<VRDisplayCapabilities> m_capabilities; |
146 Member<VRStageParameters> m_stageParameters; | 147 Member<VRStageParameters> m_stageParameters; |
147 Member<VREyeParameters> m_eyeParametersLeft; | 148 Member<VREyeParameters> m_eyeParametersLeft; |
148 Member<VREyeParameters> m_eyeParametersRight; | 149 Member<VREyeParameters> m_eyeParametersRight; |
149 device::mojom::blink::VRPosePtr m_framePose; | 150 device::mojom::blink::VRPosePtr m_framePose; |
| 151 int16_t m_frameId; |
150 VRLayer m_layer; | 152 VRLayer m_layer; |
151 double m_depthNear = 0.01; | 153 double m_depthNear = 0.01; |
152 double m_depthFar = 10000.0; | 154 double m_depthFar = 10000.0; |
153 | 155 |
154 void dispose(); | 156 void dispose(); |
155 | 157 |
156 TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer; | 158 TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer; |
157 String m_fullscreenOrigWidth; | 159 String m_fullscreenOrigWidth; |
158 String m_fullscreenOrigHeight; | 160 String m_fullscreenOrigHeight; |
159 gpu::gles2::GLES2Interface* m_contextGL = nullptr; | 161 gpu::gles2::GLES2Interface* m_contextGL = nullptr; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 ServiceInactive = 11, | 193 ServiceInactive = 11, |
192 RequestDenied = 12, | 194 RequestDenied = 12, |
193 PresentationResultMax, // Must be last member of enum. | 195 PresentationResultMax, // Must be last member of enum. |
194 }; | 196 }; |
195 | 197 |
196 void ReportPresentationResult(PresentationResult); | 198 void ReportPresentationResult(PresentationResult); |
197 | 199 |
198 } // namespace blink | 200 } // namespace blink |
199 | 201 |
200 #endif // VRDisplay_h | 202 #endif // VRDisplay_h |
OLD | NEW |