| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 VRDisplay* getDisplayForIndex(unsigned index); | 46 VRDisplay* getDisplayForIndex(unsigned index); |
| 47 | 47 |
| 48 DECLARE_VIRTUAL_TRACE(); | 48 DECLARE_VIRTUAL_TRACE(); |
| 49 | 49 |
| 50 private: | 50 private: |
| 51 // Binding callbacks. | 51 // Binding callbacks. |
| 52 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); | 52 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); |
| 53 | 53 |
| 54 // VRServiceClient. | 54 // VRServiceClient. |
| 55 void OnDisplayChanged(device::blink::VRDisplayPtr) override; | 55 void OnDisplayChanged(device::blink::VRDisplayPtr) override; |
| 56 void OnDisplayConnected(device::blink::VRDisplayPtr) override; |
| 57 void OnDisplayDisconnected(unsigned) override; |
| 56 | 58 |
| 57 // ContextLifecycleObserver. | 59 // ContextLifecycleObserver. |
| 58 void contextDestroyed() override; | 60 void contextDestroyed() override; |
| 59 | 61 |
| 60 Member<NavigatorVR> m_navigatorVR; | 62 Member<NavigatorVR> m_navigatorVR; |
| 61 VRDisplayVector m_displays; | 63 VRDisplayVector m_displays; |
| 62 | 64 |
| 63 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; | 65 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; |
| 64 device::blink::VRServicePtr m_service; | 66 device::blink::VRServicePtr m_service; |
| 65 mojo::Binding<device::blink::VRServiceClient> m_binding; | 67 mojo::Binding<device::blink::VRServiceClient> m_binding; |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 } // namespace blink | 70 } // namespace blink |
| 69 | 71 |
| 70 #endif // VRController_h | 72 #endif // VRController_h |
| OLD | NEW |