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

Unified Diff: Source/modules/gamepad/GamepadCommon.h

Issue 280393004: Update Gamepad.axes / GamepadButton.value to match the latest specification (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back #ifdefs Created 6 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 | « Source/modules/gamepad/GamepadButton.idl ('k') | Source/modules/gamepad/GamepadCommon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
+ 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
« no previous file with comments | « Source/modules/gamepad/GamepadButton.idl ('k') | Source/modules/gamepad/GamepadCommon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698