| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NavigatorVRDevice_h | |
| 6 #define NavigatorVRDevice_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptPromise.h" | |
| 9 #include "core/frame/DOMWindowProperty.h" | |
| 10 #include "modules/ModulesExport.h" | |
| 11 #include "modules/vr/VRDevice.h" | |
| 12 #include "modules/vr/VRHardwareUnit.h" | |
| 13 #include "platform/Supplementable.h" | |
| 14 #include "platform/heap/Handle.h" | |
| 15 #include "public/platform/WebVector.h" | |
| 16 #include "wtf/Noncopyable.h" | |
| 17 | |
| 18 namespace blink { | |
| 19 | |
| 20 class Document; | |
| 21 class Navigator; | |
| 22 class VRController; | |
| 23 class VRHardwareUnitCollection; | |
| 24 | |
| 25 class MODULES_EXPORT NavigatorVRDevice final : public GarbageCollected<Navigator
VRDevice>, public Supplement<Navigator>, public DOMWindowProperty { | |
| 26 USING_GARBAGE_COLLECTED_MIXIN(NavigatorVRDevice); | |
| 27 WTF_MAKE_NONCOPYABLE(NavigatorVRDevice); | |
| 28 public: | |
| 29 static NavigatorVRDevice* from(Document&); | |
| 30 static NavigatorVRDevice& from(Navigator&); | |
| 31 static ScriptPromise getVRDevices(ScriptState*, Navigator&); | |
| 32 ScriptPromise getVRDevices(ScriptState*); | |
| 33 | |
| 34 VRController* controller(); | |
| 35 | |
| 36 DECLARE_VIRTUAL_TRACE(); | |
| 37 | |
| 38 private: | |
| 39 friend class VRHardwareUnit; | |
| 40 friend class VRGetDevicesCallback; | |
| 41 | |
| 42 explicit NavigatorVRDevice(LocalFrame*); | |
| 43 | |
| 44 static const char* supplementName(); | |
| 45 | |
| 46 Member<VRHardwareUnitCollection> m_hardwareUnits; | |
| 47 }; | |
| 48 | |
| 49 } // namespace blink | |
| 50 | |
| 51 #endif // NavigatorVRDevice_h | |
| OLD | NEW |