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

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

Issue 848053002: Adding WebVR interface to Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed sigbjornf@'s epic amount of feedback 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 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 HMDVRDevice_h
6 #define HMDVRDevice_h
7
8 #include "core/dom/DOMPoint.h"
9 #include "core/dom/DOMRect.h"
10 #include "modules/vr/VRDevice.h"
11 #include "platform/heap/Handle.h"
12 #include "public/platform/WebVR.h"
13 #include "wtf/Forward.h"
14 #include "wtf/text/WTFString.h"
15
16 namespace blink {
17
18 class VRPoint3D;
19 class VRFieldOfView;
20 class VRRect;
21
22 class HMDVRDevice final : public VRDevice {
23 DEFINE_WRAPPERTYPEINFO();
24 public:
25 explicit HMDVRDevice(VRHardwareUnit*);
26
27 typedef Vector<double> DoubleVector;
28
29 virtual void updateFromWebVRDevice(const WebVRDevice&) override;
30
31 DOMPoint* getEyeTranslation(const String&);
32 VRFieldOfView* getCurrentEyeFieldOfView(const String&);
33 VRFieldOfView* getRecommendedEyeFieldOfView(const String&);
34 VRFieldOfView* getMaximumEyeFieldOfView(const String&);
35 DOMRect* getRecommendedEyeRenderRect(const String&);
36 void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0) ;
37
38 virtual void trace(Visitor*) override;
39
40 private:
41 static VREye StringToVREye(const String&);
42
43 Member<VRFieldOfView> m_recommendedFOVLeft;
44 Member<VRFieldOfView> m_recommendedFOVRight;
45 Member<VRFieldOfView> m_maximumFOVLeft;
46 Member<VRFieldOfView> m_maximumFOVRight;
47 Member<DOMPoint> m_eyeTranslationLeft;
48 Member<DOMPoint> m_eyeTranslationRight;
49 };
50
51 } // namespace blink
52
53 #endif // HMDVRDevice_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698