Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 VRDevice_h | |
| 6 #define VRDevice_h | |
| 7 | |
| 8 #include "bindings/core/v8/ScriptWrappable.h" | |
| 9 #include "modules/vr/VRHardwareUnit.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 #include "wtf/RefCounted.h" | |
| 12 #include "wtf/text/WTFString.h" | |
| 13 | |
| 14 namespace blink { | |
| 15 | |
| 16 class VRDevice : public GarbageCollectedFinalized<VRDevice>, public ScriptWrappa ble { | |
| 17 DEFINE_WRAPPERTYPEINFO(); | |
| 18 public: | |
| 19 unsigned index() const { return m_hardwareUnit->index(); } | |
| 20 const String& hardwareUnitId() const { return m_hardwareUnit->hardwareUnitId (); } | |
| 21 const String& deviceId() const { return m_deviceId; } | |
| 22 const String& deviceName() const { return m_deviceName; } | |
| 23 | |
| 24 VRHardwareUnit* hardwareUnit() { return m_hardwareUnit; } | |
| 25 const VRHardwareUnit* hardwareUnit() const { return m_hardwareUnit; } | |
| 26 | |
| 27 virtual void updateFromWebVRDevice(const WebVRDevice&); | |
| 28 | |
| 29 virtual void trace(Visitor*); | |
| 30 | |
| 31 protected: | |
| 32 VRDevice(VRHardwareUnit*); | |
|
sof
2015/02/24 12:35:29
nit: add explicit.
| |
| 33 | |
| 34 private: | |
| 35 Member<VRHardwareUnit> m_hardwareUnit; | |
| 36 String m_deviceId; | |
| 37 String m_deviceName; | |
| 38 }; | |
| 39 | |
| 40 typedef HeapVector<Member<VRDevice>> VRDeviceVector; | |
|
sof
2015/02/24 12:35:29
Styleguide recommends using 'using' for aliases in
| |
| 41 | |
| 42 } // namespace blink | |
| 43 | |
| 44 #endif // VRDevice_h | |
| OLD | NEW |