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

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

Issue 2041003003: Moved vr_service.mojom from blink to device (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed missing mojo dependency in gyp builds Created 4 years, 6 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/LocalFrameLifecycleObserver.h"
9 #include "device/vr/vr_service.mojom-blink.h"
9 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
10 #include "platform/Supplementable.h" 11 #include "platform/Supplementable.h"
11 #include "public/platform/modules/vr/vr_service.mojom-blink.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 { 24 , public LocalFrameLifecycleObserver {
25 USING_GARBAGE_COLLECTED_MIXIN(VRController); 25 USING_GARBAGE_COLLECTED_MIXIN(VRController);
26 WTF_MAKE_NONCOPYABLE(VRController); 26 WTF_MAKE_NONCOPYABLE(VRController);
27 public: 27 public:
28 virtual ~VRController(); 28 virtual ~VRController();
29 29
30 void getDisplays(std::unique_ptr<VRGetDevicesCallback>); 30 void getDisplays(std::unique_ptr<VRGetDevicesCallback>);
31 31
32 mojom::blink::VRPosePtr getPose(unsigned index); 32 device::blink::VRPosePtr getPose(unsigned index);
33 33
34 void resetPose(unsigned index); 34 void resetPose(unsigned index);
35 35
36 static void provideTo(LocalFrame&, ServiceRegistry*); 36 static void provideTo(LocalFrame&, ServiceRegistry*);
37 static VRController* from(LocalFrame&); 37 static VRController* from(LocalFrame&);
38 static const char* supplementName(); 38 static const char* supplementName();
39 39
40 DECLARE_VIRTUAL_TRACE(); 40 DECLARE_VIRTUAL_TRACE();
41 41
42 private: 42 private:
43 VRController(LocalFrame&, ServiceRegistry*); 43 VRController(LocalFrame&, ServiceRegistry*);
44 44
45 // Inherited from LocalFrameLifecycleObserver. 45 // Inherited from LocalFrameLifecycleObserver.
46 void willDetachFrameHost() override; 46 void willDetachFrameHost() override;
47 47
48 // Binding callbacks. 48 // Binding callbacks.
49 void onGetDisplays(mojo::WTFArray<mojom::blink::VRDisplayPtr>); 49 void onGetDisplays(mojo::WTFArray<device::blink::VRDisplayPtr>);
50 50
51 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks; 51 Deque<std::unique_ptr<VRGetDevicesCallback>> m_pendingGetDevicesCallbacks;
52 mojom::blink::VRServicePtr m_service; 52 device::blink::VRServicePtr m_service;
53 }; 53 };
54 54
55 } // namespace blink 55 } // namespace blink
56 56
57 #endif // VRController_h 57 #endif // VRController_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/DEPS ('k') | third_party/WebKit/Source/modules/vr/VRController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698