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 NavigatorVR_h | 5 #ifndef NavigatorVR_h |
6 #define NavigatorVR_h | 6 #define NavigatorVR_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
9 #include "core/frame/DOMWindowProperty.h" | 9 #include "core/frame/DOMWindowProperty.h" |
10 #include "modules/ModulesExport.h" | 10 #include "modules/ModulesExport.h" |
11 #include "modules/vr/VRDisplay.h" | 11 #include "modules/vr/VRDisplay.h" |
12 #include "platform/Supplementable.h" | 12 #include "platform/Supplementable.h" |
13 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
14 #include "public/platform/WebVector.h" | 14 #include "public/platform/WebVector.h" |
15 #include "wtf/Noncopyable.h" | 15 #include "wtf/Noncopyable.h" |
16 | 16 |
17 namespace blink { | 17 namespace blink { |
18 | 18 |
19 class Document; | 19 class Document; |
20 class Navigator; | 20 class Navigator; |
21 class VRController; | 21 class VRController; |
22 class VRDisplayCollection; | |
23 | 22 |
24 class MODULES_EXPORT NavigatorVR final : public GarbageCollectedFinalized<Naviga
torVR>, public Supplement<Navigator>, public DOMWindowProperty { | 23 class MODULES_EXPORT NavigatorVR final : public GarbageCollectedFinalized<Naviga
torVR>, public Supplement<Navigator>, public DOMWindowProperty { |
25 USING_GARBAGE_COLLECTED_MIXIN(NavigatorVR); | 24 USING_GARBAGE_COLLECTED_MIXIN(NavigatorVR); |
26 WTF_MAKE_NONCOPYABLE(NavigatorVR); | 25 WTF_MAKE_NONCOPYABLE(NavigatorVR); |
27 public: | 26 public: |
28 static NavigatorVR* from(Document&); | 27 static NavigatorVR* from(Document&); |
29 static NavigatorVR& from(Navigator&); | 28 static NavigatorVR& from(Navigator&); |
30 virtual ~NavigatorVR(); | 29 virtual ~NavigatorVR(); |
31 | 30 |
32 static ScriptPromise getVRDisplays(ScriptState*, Navigator&); | 31 static ScriptPromise getVRDisplays(ScriptState*, Navigator&); |
33 ScriptPromise getVRDisplays(ScriptState*); | 32 ScriptPromise getVRDisplays(ScriptState*); |
34 | 33 |
35 VRController* controller(); | 34 VRController* controller(); |
36 Document* document(); | 35 Document* document(); |
37 | 36 |
38 DECLARE_VIRTUAL_TRACE(); | 37 DECLARE_VIRTUAL_TRACE(); |
39 | 38 |
40 private: | 39 private: |
41 friend class VRDisplay; | 40 friend class VRDisplay; |
42 friend class VRGetDevicesCallback; | 41 friend class VRGetDevicesCallback; |
43 | 42 |
44 explicit NavigatorVR(LocalFrame*); | 43 explicit NavigatorVR(LocalFrame*); |
45 | 44 |
46 static const char* supplementName(); | 45 static const char* supplementName(); |
47 | 46 |
48 Member<VRDisplayCollection> m_displays; | 47 Member<VRController> m_controller; |
49 }; | 48 }; |
50 | 49 |
51 } // namespace blink | 50 } // namespace blink |
52 | 51 |
53 #endif // NavigatorVR_h | 52 #endif // NavigatorVR_h |
OLD | NEW |