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

Side by Side Diff: Source/modules/vr/NavigatorVRDevice.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 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698