Chromium Code Reviews| Index: Source/modules/gamepad/GamepadCommon.h |
| diff --git a/Source/modules/gamepad/GamepadCommon.h b/Source/modules/gamepad/GamepadCommon.h |
| index 95aede44a0232e7d8fd21f1d1775853d3bbc4f7b..f935fe6fc74f9cd850960f1b1df414b34ce77c9e 100644 |
| --- a/Source/modules/gamepad/GamepadCommon.h |
| +++ b/Source/modules/gamepad/GamepadCommon.h |
| @@ -36,7 +36,7 @@ class GamepadCommon { |
| public: |
| GamepadCommon(); |
| ~GamepadCommon(); |
| - typedef Vector<float> FloatVector; |
| + typedef Vector<double> DoubleVector; |
| const String& id() const { return m_id; } |
| void setId(const String& id) { m_id = id; } |
| @@ -53,8 +53,12 @@ public: |
| const String& mapping() const { return m_mapping; } |
| void setMapping(const String& val) { m_mapping = val; } |
| - const FloatVector& axes() const { return m_axes; } |
| + const DoubleVector& axes() const { return m_axes; } |
| +#if defined(ENABLE_NEW_GAMEPAD_API) |
|
eseidel
2014/05/20 03:05:37
We don't normally have compile time flags in Blink
|
| + void setAxes(unsigned count, const double* data); |
| +#else |
| void setAxes(unsigned count, const float* data); |
| +#endif |
| protected: |
| String m_id; |
| @@ -62,7 +66,7 @@ protected: |
| bool m_connected; |
| unsigned long long m_timestamp; |
| String m_mapping; |
| - FloatVector m_axes; |
| + DoubleVector m_axes; |
| }; |
| } // namespace WebCore |