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 |