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

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: Rebase 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
« no previous file with comments | « Source/modules/gamepad/Gamepad.idl ('k') | public/platform/WebGamepad.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/gamepad/NavigatorGamepad.cpp
diff --git a/Source/modules/gamepad/NavigatorGamepad.cpp b/Source/modules/gamepad/NavigatorGamepad.cpp
index 81f0e7708bb018e28ae8fd780f637511e1efba5d..4bf9fe16937e18763fb6b4d1a59aefc0ff5fa07d 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);
« no previous file with comments | « Source/modules/gamepad/Gamepad.idl ('k') | public/platform/WebGamepad.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698