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

Unified Diff: Source/modules/vr/VREyeParameters.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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/vr/VREyeParameters.h
diff --git a/Source/modules/vr/VREyeParameters.h b/Source/modules/vr/VREyeParameters.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d6191a5a026f9229d8a8f103da3677cf21d33fd
--- /dev/null
+++ b/Source/modules/vr/VREyeParameters.h
@@ -0,0 +1,53 @@
+// 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 VREyeParameters_h
+#define VREyeParameters_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/DOMPoint.h"
+#include "core/dom/DOMRect.h"
+#include "modules/vr/VRFieldOfView.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/WebVR.h"
+#include "wtf/Forward.h"
+
+namespace blink {
+
+class VREyeParameters final : public GarbageCollected<VREyeParameters>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static VREyeParameters* create()
+ {
+ return new VREyeParameters();
+ }
+
+ VRFieldOfView* minimumFieldOfView() const { return m_minimumFieldOfView; }
+ VRFieldOfView* maximumFieldOfView() const { return m_maximumFieldOfView; }
+ VRFieldOfView* recommendedFieldOfView() const { return m_recommendedFieldOfView; }
+ DOMPoint* eyeTranslation() const { return m_eyeTranslation; }
+ VRFieldOfView* currentFieldOfView() const { return m_currentFieldOfView; }
+ DOMRect* renderRect() const { return m_renderRect; }
+
+ void setFromWebVREyeParameters(const blink::WebVREyeParameters&);
+ void setCurrentFieldOfView(const blink::VRFieldOfView*);
+ void setRenderRect(double x, double y, double width, double height);
+
+ virtual void trace(Visitor*);
+
+private:
+ VREyeParameters();
+
+ Member<VRFieldOfView> m_minimumFieldOfView;
+ Member<VRFieldOfView> m_maximumFieldOfView;
+ Member<VRFieldOfView> m_recommendedFieldOfView;
+ Member<DOMPoint> m_eyeTranslation;
+
+ Member<VRFieldOfView> m_currentFieldOfView;
+ Member<DOMRect> m_renderRect;
+};
+
+} // namespace blink
+
+#endif // VREyeParameters_h

Powered by Google App Engine
This is Rietveld 408576698