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

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

Issue 1918143007: Updated Blink WebVR interfaces to WebVR v1 spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webvr_mojo
Patch Set: Fixed layout test Created 4 years, 7 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 VRController;
17
18 class VRDevice : public GarbageCollectedFinalized<VRDevice>, public ScriptWrappa ble {
19 DEFINE_WRAPPERTYPEINFO();
20 public:
21 virtual ~VRDevice();
22
23 unsigned index() const { return m_hardwareUnit->index(); }
24 const String& hardwareUnitId() const { return m_hardwareUnit->hardwareUnitId (); }
25 const String& deviceId() const { return m_deviceId; }
26 const String& deviceName() const { return m_deviceName; }
27
28 VRHardwareUnit* hardwareUnit() { return m_hardwareUnit; }
29 const VRHardwareUnit* hardwareUnit() const { return m_hardwareUnit; }
30
31 VRController* controller() { return m_hardwareUnit->controller(); }
32
33 virtual void updateFromWebVRDevice(const WebVRDevice&);
34
35 DECLARE_VIRTUAL_TRACE();
36
37 protected:
38 VRDevice(VRHardwareUnit*, unsigned);
39
40 private:
41 Member<VRHardwareUnit> m_hardwareUnit;
42 String m_deviceId;
43 String m_deviceName;
44 };
45
46 using VRDeviceVector = HeapVector<Member<VRDevice>>;
47
48 } // namespace blink
49
50 #endif // VRDevice_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/vr/PositionSensorVRDevice.idl ('k') | third_party/WebKit/Source/modules/vr/VRDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698