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

Unified Diff: third_party/WebKit/Source/modules/vr/VRPose.h

Issue 1918143007: Updated Blink WebVR interfaces to WebVR v1 spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webvr_mojo
Patch Set: Fixed layout test Created 4 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRLayer.idl ('k') | third_party/WebKit/Source/modules/vr/VRPose.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/vr/VRPose.h
diff --git a/third_party/WebKit/Source/modules/vr/VRPose.h b/third_party/WebKit/Source/modules/vr/VRPose.h
new file mode 100644
index 0000000000000000000000000000000000000000..eea469436481f21d7ebd447b41f100c575211596
--- /dev/null
+++ b/third_party/WebKit/Source/modules/vr/VRPose.h
@@ -0,0 +1,50 @@
+// 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 VRPose_h
+#define VRPose_h
+
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "core/dom/DOMTypedArray.h"
+#include "platform/heap/Handle.h"
+#include "public/platform/modules/vr/WebVR.h"
+#include "wtf/Forward.h"
+
+namespace blink {
+
+class VRPose final : public GarbageCollectedFinalized<VRPose>, public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static VRPose* create()
+ {
+ return new VRPose();
+ }
+
+ double timeStamp() const { return m_timeStamp; }
+ DOMFloat32Array* orientation() const { return m_orientation; }
+ DOMFloat32Array* position() const { return m_position; }
+ DOMFloat32Array* angularVelocity() const { return m_angularVelocity; }
+ DOMFloat32Array* linearVelocity() const { return m_linearVelocity; }
+ DOMFloat32Array* angularAcceleration() const { return m_angularAcceleration; }
+ DOMFloat32Array* linearAcceleration() const { return m_linearAcceleration; }
+
+ void setPose(const WebHMDSensorState&);
+
+ DECLARE_VIRTUAL_TRACE();
+
+private:
+ VRPose();
+
+ double m_timeStamp;
+ Member<DOMFloat32Array> m_orientation;
+ Member<DOMFloat32Array> m_position;
+ Member<DOMFloat32Array> m_angularVelocity;
+ Member<DOMFloat32Array> m_linearVelocity;
+ Member<DOMFloat32Array> m_angularAcceleration;
+ Member<DOMFloat32Array> m_linearAcceleration;
+};
+
+} // namespace blink
+
+#endif // VRPose_h
« no previous file with comments | « third_party/WebKit/Source/modules/vr/VRLayer.idl ('k') | third_party/WebKit/Source/modules/vr/VRPose.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698