| 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 "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/dom/FrameRequestCallback.h" | 10 #include "core/dom/FrameRequestCallback.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 private: | 103 private: |
| 104 void onFullscreenCheck(TimerBase*); | 104 void onFullscreenCheck(TimerBase*); |
| 105 void onPresentComplete(ScriptPromiseResolver*, bool); | 105 void onPresentComplete(ScriptPromiseResolver*, bool); |
| 106 | 106 |
| 107 void onDisplayConnected(); | 107 void onDisplayConnected(); |
| 108 void onDisplayDisconnected(); | 108 void onDisplayDisconnected(); |
| 109 | 109 |
| 110 // VRDisplayClient | 110 // VRDisplayClient |
| 111 void OnDisplayChanged(device::mojom::blink::VRDisplayInfoPtr) override; | 111 void OnDisplayChanged(device::mojom::blink::VRDisplayInfoPtr) override; |
| 112 void OnExitPresent() override; | 112 void OnExitPresent() override; |
| 113 void OnDisplayBlur() override; |
| 114 void OnDisplayFocus() override; |
| 113 | 115 |
| 114 ScriptedAnimationController& ensureScriptedAnimationController(Document*); | 116 ScriptedAnimationController& ensureScriptedAnimationController(Document*); |
| 115 | 117 |
| 116 Member<NavigatorVR> m_navigatorVR; | 118 Member<NavigatorVR> m_navigatorVR; |
| 117 unsigned m_displayId; | 119 unsigned m_displayId; |
| 118 String m_displayName; | 120 String m_displayName; |
| 119 bool m_isConnected; | 121 bool m_isConnected; |
| 120 bool m_isPresenting; | 122 bool m_isPresenting; |
| 121 bool m_canUpdateFramePose; | 123 bool m_canUpdateFramePose; |
| 122 unsigned m_compositorHandle; | |
| 123 Member<VRDisplayCapabilities> m_capabilities; | 124 Member<VRDisplayCapabilities> m_capabilities; |
| 124 Member<VRStageParameters> m_stageParameters; | 125 Member<VRStageParameters> m_stageParameters; |
| 125 Member<VREyeParameters> m_eyeParametersLeft; | 126 Member<VREyeParameters> m_eyeParametersLeft; |
| 126 Member<VREyeParameters> m_eyeParametersRight; | 127 Member<VREyeParameters> m_eyeParametersRight; |
| 127 device::mojom::blink::VRPosePtr m_framePose; | 128 device::mojom::blink::VRPosePtr m_framePose; |
| 128 VRLayer m_layer; | 129 VRLayer m_layer; |
| 129 double m_depthNear; | 130 double m_depthNear; |
| 130 double m_depthFar; | 131 double m_depthFar; |
| 131 | 132 |
| 132 void dispose(); | 133 void dispose(); |
| 133 | 134 |
| 134 Timer<VRDisplay> m_fullscreenCheckTimer; | 135 Timer<VRDisplay> m_fullscreenCheckTimer; |
| 135 gpu::gles2::GLES2Interface* m_contextGL; | 136 gpu::gles2::GLES2Interface* m_contextGL; |
| 136 Member<WebGLRenderingContextBase> m_renderingContext; | 137 Member<WebGLRenderingContextBase> m_renderingContext; |
| 137 | 138 |
| 138 Member<ScriptedAnimationController> m_scriptedAnimationController; | 139 Member<ScriptedAnimationController> m_scriptedAnimationController; |
| 139 bool m_animationCallbackRequested; | 140 bool m_animationCallbackRequested; |
| 140 bool m_inAnimationFrame; | 141 bool m_inAnimationFrame; |
| 142 bool m_displayBlurred; |
| 141 | 143 |
| 142 device::mojom::blink::VRDisplayPtr m_display; | 144 device::mojom::blink::VRDisplayPtr m_display; |
| 143 | 145 |
| 144 mojo::Binding<device::mojom::blink::VRDisplayClient> m_binding; | 146 mojo::Binding<device::mojom::blink::VRDisplayClient> m_binding; |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 using VRDisplayVector = HeapVector<Member<VRDisplay>>; | 149 using VRDisplayVector = HeapVector<Member<VRDisplay>>; |
| 148 | 150 |
| 149 enum class PresentationResult { | 151 enum class PresentationResult { |
| 150 Requested = 0, | 152 Requested = 0, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 161 ServiceInactive = 11, | 163 ServiceInactive = 11, |
| 162 RequestDenied = 12, | 164 RequestDenied = 12, |
| 163 PresentationResultMax, // Must be last member of enum. | 165 PresentationResultMax, // Must be last member of enum. |
| 164 }; | 166 }; |
| 165 | 167 |
| 166 void ReportPresentationResult(PresentationResult); | 168 void ReportPresentationResult(PresentationResult); |
| 167 | 169 |
| 168 } // namespace blink | 170 } // namespace blink |
| 169 | 171 |
| 170 #endif // VRDisplay_h | 172 #endif // VRDisplay_h |
| OLD | NEW |