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

Unified 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: Updated interface to match public spec 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/vr/HMDVRDevice.h
diff --git a/Source/modules/vr/HMDVRDevice.h b/Source/modules/vr/HMDVRDevice.h
new file mode 100644
index 0000000000000000000000000000000000000000..2d29407a8cb533ea27f0d87dbb3e14588829d139
--- /dev/null
+++ b/Source/modules/vr/HMDVRDevice.h
@@ -0,0 +1,51 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef HMDVRDevice_h
+#define HMDVRDevice_h
+
+#include "modules/vr/VRDevice.h"
+#include "modules/vr/VREyeParameters.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/WebVR.h"
+#include "wtf/Forward.h"
+#include "wtf/text/WTFString.h"
+
+namespace blink {
+
+class VRPoint3D;
+class VRFieldOfView;
+class VRRect;
+
+class HMDVRDevice final : public VRDevice {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ explicit HMDVRDevice(VRHardwareUnit*);
+
+ typedef Vector<double> DoubleVector;
+
+ virtual void updateFromWebVRDevice(const WebVRDevice&) override;
+
+ VREyeParameters* getEyeParameters(const String&);
+ void setFieldOfView(VRFieldOfView* leftFov = 0, VRFieldOfView* rightFov = 0);
+
+ /*DOMPoint* getEyeTranslation(const String&);
+ VRFieldOfView* getCurrentEyeFieldOfView(const String&);
+ VRFieldOfView* getRecommendedEyeFieldOfView(const String&);
+ VRFieldOfView* getMaximumEyeFieldOfView(const String&);
+ DOMRect* getRecommendedEyeRenderRect(const String&);*/
Mike West 2015/03/17 05:25:26 Nit: Please drop commented-out code from the patch
+
+ virtual void trace(Visitor*) override;
+
+private:
+ static VREye StringToVREye(const String&);
+
+ Member<VREyeParameters> m_eyeParametersLeft;
+ Member<VREyeParameters> m_eyeParametersRight;
+ bool m_dirtyFov;
+};
+
+} // namespace blink
+
+#endif // HMDVRDevice_h

Powered by Google App Engine
This is Rietveld 408576698