Lay WebProcess/UIProcess groundwork for an IPC GamepadProvider.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 21:54:59 +0000 (21:54 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 21:54:59 +0000 (21:54 +0000)
commit28f20813d936373162a0a44a11a46f5345300f3c
tree3076b92a81df74a8ba85782565cc829addf10c6d
parent3c201550b58e0e64fdc43e63812b2143dafbd0e0
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@204195 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