Index: ppapi/shared_impl/ppb_gamepad_shared.h |
diff --git a/ppapi/shared_impl/ppb_gamepad_shared.h b/ppapi/shared_impl/ppb_gamepad_shared.h |
index c6f535d3d14ecb97f9455624f3a468afc66104f2..32b5f1ff4eaa6e1aad250547ded7c45a9133f75e 100644 |
--- a/ppapi/shared_impl/ppb_gamepad_shared.h |
+++ b/ppapi/shared_impl/ppb_gamepad_shared.h |
@@ -9,6 +9,7 @@ |
#include "base/strings/string16.h" |
#include "ppapi/c/ppb_gamepad.h" |
#include "ppapi/shared_impl/ppapi_shared_export.h" |
+#include "third_party/WebKit/public/platform/WebGamepads.h" |
namespace ppapi { |
@@ -19,7 +20,11 @@ namespace ppapi { |
struct WebKitGamepadButton { |
bool pressed; |
+#if defined(ENABLE_NEW_GAMEPAD_API) |
+ double value; |
+#else |
float value; |
+#endif |
}; |
// This must match the definition of blink::Gamepad. The GamepadHost unit test |
@@ -44,7 +49,11 @@ struct WebKitGamepad { |
unsigned axes_length; |
// Normalized values representing axes, in the range [-1..1]. |
+#if defined(ENABLE_NEW_GAMEPAD_API) |
+ double axes[kAxesLengthCap]; |
+#else |
float axes[kAxesLengthCap]; |
+#endif |
// Number of valid entries in the buttons array. |
unsigned buttons_length; |