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

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: Addressed feedback from philipj@opera.com, rebased Created 5 years, 10 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 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 NavigatorVRDevice_h
6 #define NavigatorVRDevice_h
7
8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "modules/vr/VRHardwareUnit.h"
10 #include "platform/Supplementable.h"
11 #include "platform/heap/Handle.h"
12
13 namespace blink {
14
15 class Document;
16 class Navigator;
17
18 class NavigatorVRDevice final : public NoBaseWillBeGarbageCollectedFinalized<Nav igatorVRDevice>, public WillBeHeapSupplement<Navigator> {
19 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(NavigatorVRDevice);
20 public:
21 static NavigatorVRDevice* from(Document&);
22 static NavigatorVRDevice& from(Navigator&);
23 virtual ~NavigatorVRDevice();
24
25 static ScriptPromise getVRDevices(ScriptState*, Navigator&);
26 ScriptPromise getVRDevices(ScriptState*);
27
28 virtual void trace(Visitor*);
29
30 private:
31 friend VRHardwareUnit;
32
33 explicit NavigatorVRDevice();
sof 2015/02/24 12:35:29 nit: no need for explicit.
34
35 static const char* supplementName();
36
37 HeapVector<Member<VRDevice>> updateVRHardwareUnits();
sof 2015/02/24 12:35:29 How about #including "VRDevice.h" and change this
38 VRHardwareUnit* getHardwareUnitForIndex(unsigned index);
39
40 PersistentHeapVectorWillBeHeapVector<Member<VRHardwareUnit>> m_hardwareUnits ;
41 };
42
43 } // namespace blink
44
45 #endif // NavigatorVRDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698