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

Unified Diff: ppapi/shared_impl/ppb_gamepad_shared.h

Issue 289423004: Turn on ENABLE_NEW_GAMEPAD_API flag so that the new gamepad code is used (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add bug number 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 | « build/common.gypi ('k') | no next file » | no next file with comments »
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 6c21d9a3f2d98265fb7762708ab03f235c9bf1e4..22b4df7a7be1477f698feb0f6c826904c4c571ef 100644
--- a/ppapi/shared_impl/ppb_gamepad_shared.h
+++ b/ppapi/shared_impl/ppb_gamepad_shared.h
@@ -9,7 +9,6 @@
#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 {
@@ -18,17 +17,9 @@ namespace ppapi {
#pragma pack(push, 1)
-#if defined(ENABLE_NEW_GAMEPAD_API)
- typedef double buttonValueType;
- typedef double axisValueType;
-#else
- typedef float buttonValueType;
- typedef float axisValueType;
-#endif
-
struct WebKitGamepadButton {
bool pressed;
- buttonValueType value;
+ double value;
};
// This must match the definition of blink::Gamepad. The GamepadHost unit test
@@ -53,7 +44,7 @@ struct WebKitGamepad {
unsigned axes_length;
// Normalized values representing axes, in the range [-1..1].
- axisValueType axes[kAxesLengthCap];
+ double axes[kAxesLengthCap];
// Number of valid entries in the buttons array.
unsigned buttons_length;
« no previous file with comments | « build/common.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698