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

Unified Diff: ppapi/shared_impl/ppb_gamepad_shared.h

Issue 280713004: Update Gamepad API to match the latest specification (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stop patching ppapi 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 | « no previous file | ppapi/shared_impl/ppb_gamepad_shared.cc » ('j') | ppapi/shared_impl/ppb_gamepad_shared.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | ppapi/shared_impl/ppb_gamepad_shared.cc » ('j') | ppapi/shared_impl/ppb_gamepad_shared.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698