The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads
Created attachment 233967 [details] Patch v1
Ignore the can't-buildness that EWS sees - In my tree this patch is built on previous patches. I will pass it through EWS before landing.
Comment on attachment 233967 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=233967&action=review > Source/WebCore/Modules/gamepad/GamepadManager.cpp:81 > + const Vector<PlatformGamepad*>& platformGamepads = GamepadProvider::shared().platformGamepads(); Seems like a good place to use auto, although maybe Alexey wouldn’t agree. > Source/WebCore/Modules/gamepad/GamepadManager.cpp:82 > + for (unsigned i = 0; i < platformGamepads.size(); ++i) { Normally it’s an anti-pattern to actually call size each time through. My own preference is to put it into a local variable named size, either inside the for or just before it: for (unsigned i = 0, size = platformGamepads.size(); i < size; ++i) > Source/WebCore/platform/mac/HIDGamepadProvider.cpp:85 > + , m_inputNotificationTimer(this, &HIDGamepadProvider::inputNotificationTimerFired) Consider the new style Timer that uses a function/lambda instead of a pointer to member function. > Source/WebCore/platform/mac/HIDGamepadProvider.cpp:215 > + if (!m_inputNotificationTimer.isActive()) > + m_inputNotificationTimer.startOneShot(InputNotificationDelay); A why comment would be good here to explain why the isActive check. We want to delay from the time of the first input, not postpone when we get additional input, I assume.
http://trac.webkit.org/changeset/170553