12014-07-06 Brady Eidson <beidson@apple.com>
2
3 Fire connected/disconnected events for Gamepads.
4 https://bugs.webkit.org/show_bug.cgi?id=134386
5
6 Reviewed by NOBODY (OOPS!).
7
8 No new tests (No effect in a currently tested config)
9
10 * Modules/gamepad/GamepadManager.cpp:
11 (WebCore::navigatorGamepadFromDOMWindow): Handling converting a possibly-null Navigator into
12 a possibly null NavigatorGamepad.
13 (WebCore::GamepadManager::platformGamepadConnected): Notify blind Navigator/DOMWindows of all
14 previously attached Gamepads, then notify everybody of this new gamepad.
15 (WebCore::GamepadManager::platformGamepadDisconnected): Handle dispatching the disconnected
16 event to all registered DOMWindows.
17 (WebCore::GamepadManager::platformGamepadInputActivity): Notify blind Navigator/DOMWindows of all
18 attached Gamepads.
19 (WebCore::GamepadManager::makeGamepadVisible): Handles notifying setting up a new gamepads
20 with all NavigatorGamepads as well as dispatching the connected even to DOMWindows.
21 (WebCore::GamepadManager::registerDOMWindow):
22 (WebCore::GamepadManager::unregisterDOMWindow):
23 (WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Deleted.
24 * Modules/gamepad/GamepadManager.h:
25
26 * Modules/gamepad/NavigatorGamepad.cpp:
27 (WebCore::NavigatorGamepad::gamepadAtIndex):
28 * Modules/gamepad/NavigatorGamepad.h:
29