| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // VRDisplayClient | 129 // VRDisplayClient |
| 130 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; | 130 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; |
| 131 void OnExitPresent() override; | 131 void OnExitPresent() override; |
| 132 void OnBlur() override; | 132 void OnBlur() override; |
| 133 void OnFocus() override; | 133 void OnFocus() override; |
| 134 void OnActivate(device::mojom::blink::VRDisplayEventReason) override; | 134 void OnActivate(device::mojom::blink::VRDisplayEventReason) override; |
| 135 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; | 135 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; |
| 136 | 136 |
| 137 void OnVSync(device::mojom::blink::VRPosePtr, | 137 void OnVSync(device::mojom::blink::VRPosePtr, |
| 138 mojo::common::mojom::blink::TimeDeltaPtr, | 138 mojo::common::mojom::blink::TimeDeltaPtr, |
| 139 int16_t frameId); | 139 int16_t frameId, |
| 140 device::mojom::blink::VRVSyncProvider::Status); |
| 140 void ConnectVSyncProvider(); | 141 void ConnectVSyncProvider(); |
| 141 | 142 |
| 142 ScriptedAnimationController& ensureScriptedAnimationController(Document*); | 143 ScriptedAnimationController& ensureScriptedAnimationController(Document*); |
| 143 | 144 |
| 144 Member<NavigatorVR> m_navigatorVR; | 145 Member<NavigatorVR> m_navigatorVR; |
| 145 unsigned m_displayId = 0; | 146 unsigned m_displayId = 0; |
| 146 String m_displayName; | 147 String m_displayName; |
| 147 bool m_isConnected = false; | 148 bool m_isConnected = false; |
| 148 bool m_isPresenting = false; | 149 bool m_isPresenting = false; |
| 149 bool m_isValidDeviceForPresenting = true; | 150 bool m_isValidDeviceForPresenting = true; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 164 void dispose(); | 165 void dispose(); |
| 165 | 166 |
| 166 TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer; | 167 TaskRunnerTimer<VRDisplay> m_fullscreenCheckTimer; |
| 167 String m_fullscreenOrigWidth; | 168 String m_fullscreenOrigWidth; |
| 168 String m_fullscreenOrigHeight; | 169 String m_fullscreenOrigHeight; |
| 169 gpu::gles2::GLES2Interface* m_contextGL = nullptr; | 170 gpu::gles2::GLES2Interface* m_contextGL = nullptr; |
| 170 Member<WebGLRenderingContextBase> m_renderingContext; | 171 Member<WebGLRenderingContextBase> m_renderingContext; |
| 171 | 172 |
| 172 Member<ScriptedAnimationController> m_scriptedAnimationController; | 173 Member<ScriptedAnimationController> m_scriptedAnimationController; |
| 173 bool m_pendingRaf = false; | 174 bool m_pendingRaf = false; |
| 175 bool m_pendingVsync = false; |
| 174 bool m_inAnimationFrame = false; | 176 bool m_inAnimationFrame = false; |
| 175 bool m_displayBlurred = false; | 177 bool m_displayBlurred = false; |
| 176 bool m_reenteredFullscreen = false; | 178 bool m_reenteredFullscreen = false; |
| 177 double m_timebase = -1; | 179 double m_timebase = -1; |
| 178 | 180 |
| 179 device::mojom::blink::VRDisplayPtr m_display; | 181 device::mojom::blink::VRDisplayPtr m_display; |
| 180 | 182 |
| 181 mojo::Binding<device::mojom::blink::VRDisplayClient> m_displayClientBinding; | 183 mojo::Binding<device::mojom::blink::VRDisplayClient> m_displayClientBinding; |
| 182 device::mojom::blink::VRVSyncProviderPtr m_vrVSyncProvider; | 184 device::mojom::blink::VRVSyncProviderPtr m_vrVSyncProvider; |
| 183 | 185 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 202 RequestDenied = 12, | 204 RequestDenied = 12, |
| 203 FullscreenNotEnabled = 13, | 205 FullscreenNotEnabled = 13, |
| 204 PresentationResultMax, // Must be last member of enum. | 206 PresentationResultMax, // Must be last member of enum. |
| 205 }; | 207 }; |
| 206 | 208 |
| 207 void ReportPresentationResult(PresentationResult); | 209 void ReportPresentationResult(PresentationResult); |
| 208 | 210 |
| 209 } // namespace blink | 211 } // namespace blink |
| 210 | 212 |
| 211 #endif // VRDisplay_h | 213 #endif // VRDisplay_h |
| OLD | NEW |