Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: Source/modules/vr/VRDevice.h

Issue 848053002: Adding WebVR interface to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed compiler warning treated as an error on Windows Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 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/Forward.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 explicit VRDevice(VRHardwareUnit*);
33
34 private:
35 Member<VRHardwareUnit> m_hardwareUnit;
36 String m_deviceId;
37 String m_deviceName;
38 };
39
40 using VRDeviceVector = HeapVector<Member<VRDevice>>;
41
42 } // namespace blink
43
44 #endif // VRDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698