Chromium Code Reviews| Index: Source/modules/vr/NavigatorVRDevice.h |
| diff --git a/Source/modules/vr/NavigatorVRDevice.h b/Source/modules/vr/NavigatorVRDevice.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f771f7c0dae4354ad99308c5c2277fc18e4042fa |
| --- /dev/null |
| +++ b/Source/modules/vr/NavigatorVRDevice.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef NavigatorVRDevice_h |
| +#define NavigatorVRDevice_h |
| + |
| +#include "bindings/core/v8/ScriptPromise.h" |
| +#include "modules/vr/VRHardwareUnit.h" |
| +#include "platform/Supplementable.h" |
| +#include "platform/heap/Handle.h" |
| + |
| +namespace blink { |
| + |
| +class Document; |
| +class Navigator; |
| + |
| +class NavigatorVRDevice final : public NoBaseWillBeGarbageCollectedFinalized<NavigatorVRDevice>, public WillBeHeapSupplement<Navigator> { |
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorVRDevice); |
| +public: |
| + static NavigatorVRDevice* from(Document&); |
| + static NavigatorVRDevice& from(Navigator&); |
| + virtual ~NavigatorVRDevice(); |
| + |
| + static ScriptPromise getVRDevices(ScriptState*, Navigator&); |
| + ScriptPromise getVRDevices(ScriptState*); |
| + |
| + virtual void trace(Visitor*); |
| + |
| +private: |
| + friend VRHardwareUnit; |
| + |
| + explicit NavigatorVRDevice(); |
|
sof
2015/02/24 12:35:29
nit: no need for explicit.
|
| + |
| + static const char* supplementName(); |
| + |
| + HeapVector<Member<VRDevice>> updateVRHardwareUnits(); |
|
sof
2015/02/24 12:35:29
How about #including "VRDevice.h" and change this
|
| + VRHardwareUnit* getHardwareUnitForIndex(unsigned index); |
| + |
| + PersistentHeapVectorWillBeHeapVector<Member<VRHardwareUnit>> m_hardwareUnits; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // NavigatorVRDevice_h |