| Index: Source/modules/gamepad/GamepadCommon.h
|
| diff --git a/Source/modules/gamepad/Gamepad.h b/Source/modules/gamepad/GamepadCommon.h
|
| similarity index 78%
|
| copy from Source/modules/gamepad/Gamepad.h
|
| copy to Source/modules/gamepad/GamepadCommon.h
|
| index 1787b1f83d5f63f9f51d3b66a44da924078f5a65..95aede44a0232e7d8fd21f1d1775853d3bbc4f7b 100644
|
| --- a/Source/modules/gamepad/Gamepad.h
|
| +++ b/Source/modules/gamepad/GamepadCommon.h
|
| @@ -23,27 +23,19 @@
|
| * DAMAGE.
|
| */
|
|
|
| -#ifndef Gamepad_h
|
| -#define Gamepad_h
|
| +#ifndef GamepadCommon_h
|
| +#define GamepadCommon_h
|
|
|
| -#include "bindings/v8/ScriptWrappable.h"
|
| -#include "heap/Handle.h"
|
| -#include "modules/gamepad/GamepadButton.h"
|
| #include "public/platform/WebGamepad.h"
|
| -#include "wtf/RefCounted.h"
|
| #include "wtf/Vector.h"
|
| #include "wtf/text/WTFString.h"
|
|
|
| namespace WebCore {
|
|
|
| -class Gamepad FINAL : public RefCountedWillBeGarbageCollectedFinalized<Gamepad>, public ScriptWrappable {
|
| +class GamepadCommon {
|
| public:
|
| - static PassRefPtrWillBeRawPtr<Gamepad> create()
|
| - {
|
| - return adoptRefWillBeNoop(new Gamepad);
|
| - }
|
| - ~Gamepad();
|
| -
|
| + GamepadCommon();
|
| + ~GamepadCommon();
|
| typedef Vector<float> FloatVector;
|
|
|
| const String& id() const { return m_id; }
|
| @@ -64,22 +56,15 @@ public:
|
| const FloatVector& axes() const { return m_axes; }
|
| void setAxes(unsigned count, const float* data);
|
|
|
| - const GamepadButtonVector& buttons() const { return m_buttons; }
|
| - void setButtons(unsigned count, const blink::WebGamepadButton* data);
|
| -
|
| - void trace(Visitor*);
|
| -
|
| -private:
|
| - Gamepad();
|
| +protected:
|
| String m_id;
|
| unsigned m_index;
|
| bool m_connected;
|
| unsigned long long m_timestamp;
|
| String m_mapping;
|
| FloatVector m_axes;
|
| - GamepadButtonVector m_buttons;
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // Gamepad_h
|
| +#endif // GamepadCommon_h
|
|
|