GameController.framework backend for gamepad API.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 22:23:20 +0000 (22:23 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 22:23:20 +0000 (22:23 +0000)
commit428a8975506958db9b7caa9ed78d24409368228c
tree898bc6d26a26003fad61618de42853ff8918c2b2
parentbeb71d0b41153990d9f37cd026237be096c52311
GameController.framework backend for gamepad API.
https://bugs.webkit.org/show_bug.cgi?id=161086

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Native framework backends not directly testable)

* WebCore.xcodeproj/project.pbxproj:

* platform/gamepad/cocoa/GameControllerGamepad.h: Copied from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
* platform/gamepad/cocoa/GameControllerGamepad.mm: Added.
(WebCore::GameControllerGamepad::GameControllerGamepad):
(WebCore::GameControllerGamepad::setupAsExtendedGamepad):
(WebCore::GameControllerGamepad::setupAsGamepad):

* platform/gamepad/cocoa/GameControllerGamepadProvider.h: Added.
* platform/gamepad/cocoa/GameControllerGamepadProvider.mm: Added.
(WebCore::GameControllerGamepadProvider::singleton):
(WebCore::GameControllerGamepadProvider::GameControllerGamepadProvider):
(WebCore::GameControllerGamepadProvider::controllerDidConnect):
(WebCore::GameControllerGamepadProvider::controllerDidDisconnect):
(WebCore::GameControllerGamepadProvider::startMonitoringGamepads):
(WebCore::GameControllerGamepadProvider::stopMonitoringGamepads):
(WebCore::GameControllerGamepadProvider::indexForNewlyConnectedDevice):
(WebCore::GameControllerGamepadProvider::gamepadHadInput):
(WebCore::GameControllerGamepadProvider::makeInvisibileGamepadsVisible):
(WebCore::GameControllerGamepadProvider::inputNotificationTimerFired):

Source/WebKit2:

* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _forceGameControllerFramework]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:

* UIProcess/Gamepad/UIGamepadProvider.h:

* UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm: Renamed from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp.
(WebKit::UIGamepadProvider::setUsesGameControllerFramework):
(WebKit::UIGamepadProvider::platformSetDefaultGamepadProvider):
(WebKit::UIGamepadProvider::platformStopMonitoringInput):
(WebKit::UIGamepadProvider::platformStartMonitoringInput):

* WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

* wtf/RunLoop.h:
(WTF::RunLoop::TimerBase::startOneShot):

Tools:

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate awakeFromNib]):

* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController usesGameControllerFramework]):
(-[SettingsController toggleUsesGameControllerFramework:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/RunLoop.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.h [new file with mode: 0644]
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepad.mm [new file with mode: 0644]
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.h [new file with mode: 0644]
Source/WebCore/platform/gamepad/cocoa/GameControllerGamepadProvider.mm [new file with mode: 0644]
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm
Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h
Source/WebKit2/UIProcess/Gamepad/cocoa/UIGamepadProviderCocoa.mm [moved from Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp with 70% similarity]
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/MiniBrowser/mac/AppDelegate.m
Tools/MiniBrowser/mac/SettingsController.h
Tools/MiniBrowser/mac/SettingsController.m