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 "modules/vr/VRDevice.h" |
| 10 #include "modules/vr/VRHardwareUnit.h" |
| 11 #include "platform/Supplementable.h" |
| 12 #include "platform/heap/Handle.h" |
| 13 |
| 14 namespace blink { |
| 15 |
| 16 class Document; |
| 17 class Navigator; |
| 18 |
| 19 class NavigatorVRDevice final : public NoBaseWillBeGarbageCollectedFinalized<Nav
igatorVRDevice>, public WillBeHeapSupplement<Navigator> { |
| 20 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorVRDevice); |
| 21 public: |
| 22 static NavigatorVRDevice* from(Document&); |
| 23 static NavigatorVRDevice& from(Navigator&); |
| 24 virtual ~NavigatorVRDevice(); |
| 25 |
| 26 static ScriptPromise getVRDevices(ScriptState*, Navigator&); |
| 27 ScriptPromise getVRDevices(ScriptState*); |
| 28 |
| 29 virtual void trace(Visitor*); |
| 30 |
| 31 private: |
| 32 friend VRHardwareUnit; |
| 33 |
| 34 NavigatorVRDevice(); |
| 35 |
| 36 static const char* supplementName(); |
| 37 |
| 38 VRDeviceVector getUpdatedVRHardwareUnits(); |
| 39 VRHardwareUnit* getHardwareUnitForIndex(unsigned index); |
| 40 |
| 41 PersistentHeapVectorWillBeHeapVector<Member<VRHardwareUnit>> m_hardwareUnits
; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 |
| 46 #endif // NavigatorVRDevice_h |
OLD | NEW |