Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 08:00:20 +0000 (08:00 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 08:00:20 +0000 (08:00 +0000)
commit45d24f10b06785850c5a2af33beac72d36b01acd
tree554288100775207af659976dc243aae8cc6d5048
parent3e756d34f5301db45a4a749de22af0f346960ffe
Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
https://bugs.webkit.org/show_bug.cgi?id=160605

Reviewed by Alex Christensen.

This patch:
  - Introduces the GamepadProvider that the WebProcess will use (WebGamepadProvider)
  - Has that provider message to the UIProcess notifying interest in gamepad state
  - Introduces a GamepadProviderClient in the UIProcess (UIGamepadProvider) that will use
    one of the existing GamepadProviders to pass gamepad state along to WebProcesses.
  - Adds an empty skeleton for the soon-to-be-used WebGamepad, which will be the
    "PlatformGamepad" for WebProcesses.

* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:

* UIProcess/Gamepads/UIGamepadProvider.cpp: Added.
(WebKit::UIGamepadProvider::singleton):
(WebKit::UIGamepadProvider::UIGamepadProvider):
(WebKit::UIGamepadProvider::~UIGamepadProvider):
(WebKit::UIGamepadProvider::platformGamepadConnected):
(WebKit::UIGamepadProvider::platformGamepadDisconnected):
(WebKit::UIGamepadProvider::platformGamepadInputActivity):
(WebKit::UIGamepadProvider::processPoolStartedUsingGamepads):
(WebKit::UIGamepadProvider::processPoolStoppedUsingGamepads):
(WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
(WebKit::UIGamepadProvider::platformStopMonitoringGamepads):
* UIProcess/Gamepads/UIGamepadProvider.h: Added.

* UIProcess/Gamepads/mac/UIGamepadProviderHID.cpp: Added.
(WebKit::UIGamepadProvider::platformStartMonitoringGamepads):
(WebKit::UIGamepadProvider::platformStopMonitoringGamepads):

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::~WebProcessPool):
(WebKit::WebProcessPool::disconnectProcess):
(WebKit::WebProcessPool::startedUsingGamepads):
(WebKit::WebProcessPool::stoppedUsingGamepads):
(WebKit::WebProcessPool::processStoppedUsingGamepads):
* UIProcess/WebProcessPool.h:
* UIProcess/WebProcessPool.messages.in:

* WebProcess/Gamepad/WebGamepad.cpp: Added.
* WebProcess/Gamepad/WebGamepad.h: Added.

* WebProcess/Gamepad/WebGamepadProvider.cpp: Added.
(WebKit::WebGamepadProvider::singleton):
(WebKit::WebGamepadProvider::WebGamepadProvider):
(WebKit::WebGamepadProvider::~WebGamepadProvider):
(WebKit::WebGamepadProvider::startMonitoringGamepads):
(WebKit::WebGamepadProvider::stopMonitoringGamepads):
(WebKit::WebGamepadProvider::platformGamepads):
* WebProcess/Gamepad/WebGamepadProvider.h: Added.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/Gamepad/UIGamepadProvider.h [new file with mode: 0644]
Source/WebKit2/UIProcess/Gamepad/mac/UIGamepadProviderHID.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/WebProcessPool.cpp
Source/WebKit2/UIProcess/WebProcessPool.h
Source/WebKit2/UIProcess/WebProcessPool.messages.in
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Gamepad/WebGamepad.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/Gamepad/WebGamepad.h [new file with mode: 0644]
Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/Gamepad/WebGamepadProvider.h [new file with mode: 0644]
Source/WebKit2/WebProcess/WebProcess.cpp