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

Unified Diff: Source/modules/gamepad/NavigatorGamepad.cpp

Issue 170993002: Updating Blink-side WebGamepad interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Scaled back Blink changes, only contains WebGamepad interface update Created 6 years, 10 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
Index: Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/Source/modules/gamepad/NavigatorGamepad.cpp b/Source/modules/gamepad/NavigatorGamepad.cpp
index 5370c2236797a2e333c102700d6851cda3b7bcd8..e24f40bca2022e4adcb57d9a0b8b140bb62c7148 100644
--- a/Source/modules/gamepad/NavigatorGamepad.cpp
+++ b/Source/modules/gamepad/NavigatorGamepad.cpp
@@ -47,7 +47,11 @@ static void sampleGamepads(GamepadList* into)
gamepad = Gamepad::create();
gamepad->id(webGamepad.id);
gamepad->index(i);
+ gamepad->connected(webGamepad.connected);
gamepad->timestamp(webGamepad.timestamp);
+#if defined(ENABLE_NEW_GAMEPAD_API)
+ gamepad->mapping(webGamepad.mapping);
+#endif
gamepad->axes(webGamepad.axesLength, webGamepad.axes);
gamepad->buttons(webGamepad.buttonsLength, webGamepad.buttons);
into->set(i, gamepad);

Powered by Google App Engine
This is Rietveld 408576698