Index: third_party/WebKit/Source/modules/gamepad/GamepadPose.h |
diff --git a/third_party/WebKit/Source/modules/vr/VRPose.h b/third_party/WebKit/Source/modules/gamepad/GamepadPose.h |
similarity index 67% |
copy from third_party/WebKit/Source/modules/vr/VRPose.h |
copy to third_party/WebKit/Source/modules/gamepad/GamepadPose.h |
index 87dae52103b0e56d3e3c4cb234ce798acdc11b90..0ab046d1bd0218690a318c5746e824199be19317 100644 |
--- a/third_party/WebKit/Source/modules/vr/VRPose.h |
+++ b/third_party/WebKit/Source/modules/gamepad/GamepadPose.h |
@@ -1,28 +1,29 @@ |
-// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Copyright 2016 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 |
+#ifndef GamepadPose_h |
+#define GamepadPose_h |
#include "bindings/core/v8/ScriptWrappable.h" |
-#include "core/dom/DOMHighResTimeStamp.h" |
#include "core/dom/DOMTypedArray.h" |
-#include "device/vr/vr_service.mojom-blink.h" |
#include "platform/heap/Handle.h" |
+#include "public/platform/WebGamepad.h" |
#include "wtf/Forward.h" |
namespace blink { |
-class VRPose final : public GarbageCollected<VRPose>, public ScriptWrappable { |
+class GamepadPose final : public GarbageCollected<GamepadPose>, public ScriptWrappable { |
DEFINE_WRAPPERTYPEINFO(); |
public: |
- static VRPose* create() |
+ static GamepadPose* create() |
{ |
- return new VRPose(); |
+ return new GamepadPose(); |
} |
- DOMHighResTimeStamp timestamp() const { return m_timestamp; } |
+ bool hasOrientation() const { return m_hasOrientation; } |
+ bool hasPosition() const { return m_hasPosition; } |
+ |
DOMFloat32Array* orientation() const { return m_orientation; } |
DOMFloat32Array* position() const { return m_position; } |
DOMFloat32Array* angularVelocity() const { return m_angularVelocity; } |
@@ -30,14 +31,16 @@ public: |
DOMFloat32Array* angularAcceleration() const { return m_angularAcceleration; } |
DOMFloat32Array* linearAcceleration() const { return m_linearAcceleration; } |
- void setPose(const device::blink::VRPosePtr&); |
+ void setPose(const WebGamepadPose &state); |
DECLARE_VIRTUAL_TRACE(); |
private: |
- VRPose(); |
+ GamepadPose(); |
+ |
+ bool m_hasOrientation; |
+ bool m_hasPosition; |
- DOMHighResTimeStamp m_timestamp; |
Member<DOMFloat32Array> m_orientation; |
Member<DOMFloat32Array> m_position; |
Member<DOMFloat32Array> m_angularVelocity; |