Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: third_party/WebKit/Source/modules/vr/VRController.h

Issue 2510993002: Notify VRDeviceProviders when there are pages listening for vrdisplayactivate (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14 matching lines...) Expand all
25 public ContextLifecycleObserver { 25 public ContextLifecycleObserver {
26 USING_GARBAGE_COLLECTED_MIXIN(VRController); 26 USING_GARBAGE_COLLECTED_MIXIN(VRController);
27 WTF_MAKE_NONCOPYABLE(VRController); 27 WTF_MAKE_NONCOPYABLE(VRController);
28 USING_PRE_FINALIZER(VRController, dispose); 28 USING_PRE_FINALIZER(VRController, dispose);
29 29
30 public: 30 public:
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 36
36 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr, 37 void OnDisplayConnected(device::mojom::blink::VRDisplayPtr,
37 device::mojom::blink::VRDisplayClientRequest, 38 device::mojom::blink::VRDisplayClientRequest,
38 device::mojom::blink::VRDisplayInfoPtr) override; 39 device::mojom::blink::VRDisplayInfoPtr) override;
39 40
40 DECLARE_VIRTUAL_TRACE(); 41 DECLARE_VIRTUAL_TRACE();
41 42
42 private: 43 private:
43 void onDisplaysSynced(unsigned); 44 void onDisplaysSynced(unsigned);
44 void onGetDisplays(); 45 void onGetDisplays();
45 46
46 // ContextLifecycleObserver. 47 // ContextLifecycleObserver.
47 void contextDestroyed() override; 48 void contextDestroyed() override;
48 void dispose(); 49 void dispose();
49 50
50 Member<NavigatorVR> m_navigatorVR; 51 Member<NavigatorVR> m_navigatorVR;
51 VRDisplayVector m_displays; 52 VRDisplayVector m_displays;
52 53
53 bool m_displaySynced; 54 bool m_displaySynced;
54 unsigned m_numberOfSyncedDisplays; 55 unsigned m_numberOfSyncedDisplays;
55 56
56 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; 57 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks;
57 device::mojom::blink::VRServicePtr m_service; 58 device::mojom::blink::VRServicePtr m_service;
58 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding; 59 mojo::Binding<device::mojom::blink::VRServiceClient> m_binding;
59 }; 60 };
60 61
61 } // namespace blink 62 } // namespace blink
62 63
63 #endif // VRController_h 64 #endif // VRController_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/NavigatorVR.cpp ('k') | third_party/WebKit/Source/modules/vr/VRController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698