| 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 #ifndef VRController_h | 5 #ifndef VRController_h |
| 6 #define VRController_h | 6 #define VRController_h |
| 7 | 7 |
| 8 #include "core/dom/ContextLifecycleObserver.h" | 8 #include "core/dom/ContextLifecycleObserver.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "device/vr/vr_service.mojom-blink.h" | 10 #include "device/vr/vr_service.mojom-blink.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 VRController(NavigatorVR*); | 31 VRController(NavigatorVR*); |
| 32 virtual ~VRController(); | 32 virtual ~VRController(); |
| 33 | 33 |
| 34 void getDisplays(ScriptPromiseResolver*); | 34 void getDisplays(ScriptPromiseResolver*); |
| 35 void setListeningForActivate(bool); | 35 void setListeningForActivate(bool); |
| 36 | 36 |
| 37 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr, | 37 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr, |
| 38 device::mojom::blink::VRDisplayClientRequest, | 38 device::mojom::blink::VRDisplayClientRequest, |
| 39 device::mojom::blink::VRDisplayInfoPtr) override; | 39 device::mojom::blink::VRDisplayInfoPtr) override; |
| 40 | 40 |
| 41 void focusChanged(); |
| 42 |
| 41 DECLARE_VIRTUAL_TRACE(); | 43 DECLARE_VIRTUAL_TRACE(); |
| 42 | 44 |
| 43 private: | 45 private: |
| 44 void onDisplaysSynced(unsigned); | 46 void onDisplaysSynced(unsigned); |
| 45 void onGetDisplays(); | 47 void onGetDisplays(); |
| 46 | 48 |
| 47 // ContextLifecycleObserver. | 49 // ContextLifecycleObserver. |
| 48 void contextDestroyed(ExecutionContext*) override; | 50 void contextDestroyed(ExecutionContext*) override; |
| 49 void dispose(); | 51 void dispose(); |
| 50 | 52 |
| 51 Member<NavigatorVR> m_navigatorVR; | 53 Member<NavigatorVR> m_navigatorVR; |
| 52 VRDisplayVector m_displays; | 54 VRDisplayVector m_displays; |
| 53 | 55 |
| 54 bool m_displaySynced; | 56 bool m_displaySynced; |
| 55 unsigned m_numberOfSyncedDisplays; | 57 unsigned m_numberOfSyncedDisplays; |
| 56 | 58 |
| 57 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; | 59 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; |
| 58 device::mojom::blink::VRServicePtr m_service; | 60 device::mojom::blink::VRServicePtr m_service; |
| 59 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding; | 61 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding; |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 } // namespace blink | 64 } // namespace blink |
| 63 | 65 |
| 64 #endif // VRController_h | 66 #endif // VRController_h |
| OLD | NEW |