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

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

Issue 2142753002: Remove LocalFrameLifecycleObserver::willDetachFrameHost() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 months 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/frame/LocalFrameLifecycleObserver.h" 8 #include "core/frame/LocalFrame.h"
9 #include "device/vr/vr_service.mojom-blink.h" 9 #include "device/vr/vr_service.mojom-blink.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
12 #include "wtf/Deque.h" 12 #include "wtf/Deque.h"
13 13
14 #include <memory> 14 #include <memory>
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class ServiceRegistry; 18 class ServiceRegistry;
19 class VRGetDevicesCallback; 19 class VRGetDevicesCallback;
20 20
21 class MODULES_EXPORT VRController final 21 class MODULES_EXPORT VRController final
22 : public GarbageCollectedFinalized<VRController> 22 : public GarbageCollectedFinalized<VRController>
23 , public Supplement<LocalFrame> 23 , public Supplement<LocalFrame> {
24 , public LocalFrameLifecycleObserver {
25 USING_GARBAGE_COLLECTED_MIXIN(VRController); 24 USING_GARBAGE_COLLECTED_MIXIN(VRController);
26 WTF_MAKE_NONCOPYABLE(VRController); 25 WTF_MAKE_NONCOPYABLE(VRController);
27 public: 26 public:
28 virtual ~VRController(); 27 virtual ~VRController();
29 28
30 void getDisplays(std::unique_ptr<VRGetDevicesCallback>); 29 void getDisplays(std::unique_ptr<VRGetDevicesCallback>);
31 30
32 device::blink::VRPosePtr getPose(unsigned index); 31 device::blink::VRPosePtr getPose(unsigned index);
33 32
34 void resetPose(unsigned index); 33 void resetPose(unsigned index);
35 34
36 static void provideTo(LocalFrame&, ServiceRegistry*); 35 static void provideTo(LocalFrame&, ServiceRegistry*);
37 static VRController* from(LocalFrame&); 36 static VRController* from(LocalFrame&);
38 static const char* supplementName(); 37 static const char* supplementName();
39 38
40 DECLARE_VIRTUAL_TRACE(); 39 DECLARE_VIRTUAL_TRACE();
41 40
42 private: 41 private:
43 VRController(LocalFrame&, ServiceRegistry*); 42 VRController(LocalFrame&, ServiceRegistry*);
44 43
45 // Inherited from LocalFrameLifecycleObserver.
46 void willDetachFrameHost() override;
47
48 // Binding callbacks. 44 // Binding callbacks.
49 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>); 45 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>);
50 46
51 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; 47 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks;
52 device::blink::VRServicePtr m_service; 48 device::blink::VRServicePtr m_service;
53 }; 49 };
54 50
55 } // namespace blink 51 } // namespace blink
56 52
57 #endif // VRController_h 53 #endif // VRController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698