| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // VRSubmitFrameClient | 124 // VRSubmitFrameClient |
| 125 void OnSubmitFrameTransferred(); | 125 void OnSubmitFrameTransferred(); |
| 126 void OnSubmitFrameRendered(); | 126 void OnSubmitFrameRendered(); |
| 127 | 127 |
| 128 // VRDisplayClient | 128 // VRDisplayClient |
| 129 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; | 129 void OnChanged(device::mojom::blink::VRDisplayInfoPtr) override; |
| 130 void OnExitPresent() override; | 130 void OnExitPresent() override; |
| 131 void OnBlur() override; | 131 void OnBlur() override; |
| 132 void OnFocus() override; | 132 void OnFocus() override; |
| 133 void OnActivate(device::mojom::blink::VRDisplayEventReason) override; | 133 void OnActivate(device::mojom::blink::VRDisplayEventReason, |
| 134 const OnActivateCallback& on_handled) override; |
| 134 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; | 135 void OnDeactivate(device::mojom::blink::VRDisplayEventReason) override; |
| 135 | 136 |
| 136 void OnVSync(device::mojom::blink::VRPosePtr, | 137 void OnVSync(device::mojom::blink::VRPosePtr, |
| 137 mojo::common::mojom::blink::TimeDeltaPtr, | 138 mojo::common::mojom::blink::TimeDeltaPtr, |
| 138 int16_t frame_id, | 139 int16_t frame_id, |
| 139 device::mojom::blink::VRVSyncProvider::Status); | 140 device::mojom::blink::VRVSyncProvider::Status); |
| 140 void ConnectVSyncProvider(); | 141 void ConnectVSyncProvider(); |
| 141 void OnVSyncConnectionError(); | 142 void OnVSyncConnectionError(); |
| 142 | 143 |
| 143 ScriptedAnimationController& EnsureScriptedAnimationController(Document*); | 144 ScriptedAnimationController& EnsureScriptedAnimationController(Document*); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 Member<ScriptedAnimationController> scripted_animation_controller_; | 182 Member<ScriptedAnimationController> scripted_animation_controller_; |
| 182 bool pending_raf_ = false; | 183 bool pending_raf_ = false; |
| 183 bool pending_vsync_ = false; | 184 bool pending_vsync_ = false; |
| 184 bool in_animation_frame_ = false; | 185 bool in_animation_frame_ = false; |
| 185 bool in_display_activate_ = false; | 186 bool in_display_activate_ = false; |
| 186 bool display_blurred_ = false; | 187 bool display_blurred_ = false; |
| 187 double timebase_ = -1; | 188 double timebase_ = -1; |
| 188 bool pending_previous_frame_render_ = false; | 189 bool pending_previous_frame_render_ = false; |
| 189 bool pending_submit_frame_ = false; | 190 bool pending_submit_frame_ = false; |
| 190 bool v_sync_connection_failed_ = false; | 191 bool v_sync_connection_failed_ = false; |
| 192 bool pending_present_request_ = false; |
| 191 | 193 |
| 192 device::mojom::blink::VRDisplayPtr display_; | 194 device::mojom::blink::VRDisplayPtr display_; |
| 193 | 195 |
| 194 mojo::Binding<device::mojom::blink::VRSubmitFrameClient> | 196 mojo::Binding<device::mojom::blink::VRSubmitFrameClient> |
| 195 submit_frame_client_binding_; | 197 submit_frame_client_binding_; |
| 196 mojo::Binding<device::mojom::blink::VRDisplayClient> display_client_binding_; | 198 mojo::Binding<device::mojom::blink::VRDisplayClient> display_client_binding_; |
| 197 device::mojom::blink::VRVSyncProviderPtr vr_v_sync_provider_; | 199 device::mojom::blink::VRVSyncProviderPtr vr_v_sync_provider_; |
| 198 | 200 |
| 199 HeapDeque<Member<ScriptPromiseResolver>> pending_present_resolvers_; | 201 HeapDeque<Member<ScriptPromiseResolver>> pending_present_resolvers_; |
| 200 }; | 202 }; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 217 kRequestDenied = 12, | 219 kRequestDenied = 12, |
| 218 kFullscreenNotEnabled = 13, | 220 kFullscreenNotEnabled = 13, |
| 219 kPresentationResultMax, // Must be last member of enum. | 221 kPresentationResultMax, // Must be last member of enum. |
| 220 }; | 222 }; |
| 221 | 223 |
| 222 void ReportPresentationResult(PresentationResult); | 224 void ReportPresentationResult(PresentationResult); |
| 223 | 225 |
| 224 } // namespace blink | 226 } // namespace blink |
| 225 | 227 |
| 226 #endif // VRDisplay_h | 228 #endif // VRDisplay_h |
| OLD | NEW |