Chromium Code Reviews| Index: Source/modules/vr/VRPositionState.h |
| diff --git a/Source/modules/vr/VRPositionState.h b/Source/modules/vr/VRPositionState.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..69e44236eb45fd570d1cd26bd8d1aa91cab2cd32 |
| --- /dev/null |
| +++ b/Source/modules/vr/VRPositionState.h |
| @@ -0,0 +1,52 @@ |
| +// Copyright 2014 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 VRPositionState_h |
| +#define VRPositionState_h |
| + |
| +#include "bindings/core/v8/ScriptWrappable.h" |
| +#include "core/dom/DOMPoint.h" |
| +#include "platform/heap/Handle.h" |
| +#include "public/platform/WebVR.h" |
| +#include "wtf/RefCounted.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace blink { |
| + |
| +class VRPositionState final : public GarbageCollectedFinalized<VRPositionState>, public ScriptWrappable { |
|
sof
2015/02/24 12:35:29
You can make this GarbageCollected<> and remove th
|
| + DEFINE_WRAPPERTYPEINFO(); |
| +public: |
| + static VRPositionState* create() |
| + { |
| + return new VRPositionState(); |
| + } |
| + ~VRPositionState(); |
| + |
| + double timeStamp() const { return m_timeStamp; } |
| + DOMPoint* orientation() const { return m_orientation; } |
| + DOMPoint* position() const { return m_position; } |
| + DOMPoint* angularVelocity() const { return m_angularVelocity; } |
| + DOMPoint* linearVelocity() const { return m_linearVelocity; } |
| + DOMPoint* angularAcceleration() const { return m_angularAcceleration; } |
| + DOMPoint* linearAcceleration() const { return m_linearAcceleration; } |
| + |
| + void setState(const blink::WebHMDSensorState&); |
| + |
| + virtual void trace(Visitor*); |
| + |
| +private: |
| + VRPositionState(); |
| + |
| + double m_timeStamp; |
| + Member<DOMPoint> m_orientation; |
| + Member<DOMPoint> m_position; |
| + Member<DOMPoint> m_angularVelocity; |
| + Member<DOMPoint> m_linearVelocity; |
| + Member<DOMPoint> m_angularAcceleration; |
| + Member<DOMPoint> m_linearAcceleration; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // VRPositionState_h |