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 29 matching lines...) Expand all Loading... |
40 VRDisplay* getDisplayForIndex(unsigned index); | 40 VRDisplay* getDisplayForIndex(unsigned index); |
41 | 41 |
42 DECLARE_VIRTUAL_TRACE(); | 42 DECLARE_VIRTUAL_TRACE(); |
43 | 43 |
44 private: | 44 private: |
45 // Binding callbacks. | 45 // Binding callbacks. |
46 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); | 46 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); |
47 | 47 |
48 // VRServiceClient. | 48 // VRServiceClient. |
49 void OnDisplayChanged(device::blink::VRDisplayPtr) override; | 49 void OnDisplayChanged(device::blink::VRDisplayPtr) override; |
| 50 void OnDisplayConnected(device::blink::VRDisplayPtr) override; |
| 51 void OnDisplayDisconnected(unsigned) override; |
50 | 52 |
51 // ContextLifecycleObserver. | 53 // ContextLifecycleObserver. |
52 void contextDestroyed() override; | 54 void contextDestroyed() override; |
53 | 55 |
54 Member<NavigatorVR> m_navigatorVR; | 56 Member<NavigatorVR> m_navigatorVR; |
55 VRDisplayVector m_displays; | 57 VRDisplayVector m_displays; |
56 | 58 |
57 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; | 59 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; |
58 device::blink::VRServicePtr m_service; | 60 device::blink::VRServicePtr m_service; |
59 mojo::Binding<device::blink::VRServiceClient> m_binding; | 61 mojo::Binding<device::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 |