Create platform/gamepad directory, and make GamepadProvider pure virtual (with a...
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 18:27:49 +0000 (18:27 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 5 Aug 2016 18:27:49 +0000 (18:27 +0000)
commitdbb8f73437c7be0372ae675d6a9bb21d5503d07b
tree56f822d7d14d6a5557460f9618a95ff8e91d2fa3
parent907bdb21f316dd5e838c7a4454b44abb28776c59
Create platform/gamepad directory, and make GamepadProvider pure virtual (with a default empty implementation).
https://bugs.webkit.org/show_bug.cgi?id=160599

Reviewed by Alex Christensen.

No new tests (No behavior change).

Except for the GamepadProvider/EmptyGamepadProvider split, this is just moving files around.

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebCore.xcodeproj/project.pbxproj:
* platform/Linux.cmake:

* platform/gamepad.h: Removed.

* platform/gamepad/EmptyGamepadProvider.cpp:
(WebCore::EmptyGamepadProvider::startMonitoringGamepads):
(WebCore::EmptyGamepadProvider::stopMonitoringGamepads):
(WebCore::EmptyGamepadProvider::platformGamepads):
* platform/gamepad/EmptyGamepadProvider.h:

* platform/gamepad/GamepadProvider.cpp: Renamed from Source/WebCore/platform/GamepadProvider.cpp.
(WebCore::GamepadProvider::singleton):
(WebCore::GamepadProvider::setSharedProvider):
* platform/gamepad/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadProvider.h.
(WebCore::GamepadProvider::~GamepadProvider):

* platform/gamepad/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadProviderClient.h.
(WebCore::GamepadProviderClient::~GamepadProviderClient):

* platform/gamepad/PlatformGamepad.h: Renamed from Source/WebCore/platform/PlatformGamepad.h.
(WebCore::PlatformGamepad::~PlatformGamepad):
(WebCore::PlatformGamepad::id):
(WebCore::PlatformGamepad::index):
(WebCore::PlatformGamepad::lastUpdateTime):
(WebCore::PlatformGamepad::connectTime):
(WebCore::PlatformGamepad::PlatformGamepad):

* platform/gamepad/deprecated/Gamepads.h: Renamed from Source/WebCore/platform/Gamepads.h.

* platform/gamepad/efl/GamepadsEfl.cpp: Renamed from Source/WebCore/platform/efl/GamepadsEfl.cpp.
(WebCore::GamepadDeviceEfl::resetFdHandler):
(WebCore::GamepadDeviceEfl::deviceFile):
(WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
(WebCore::GamepadDeviceEfl::~GamepadDeviceEfl):
(WebCore::GamepadDeviceEfl::readCallback):
(WebCore::GamepadsEfl::onGamePadChange):
(WebCore::GamepadsEfl::GamepadsEfl):
(WebCore::GamepadsEfl::~GamepadsEfl):
(WebCore::GamepadsEfl::registerDevice):
(WebCore::GamepadsEfl::unregisterDevice):
(WebCore::GamepadsEfl::updateGamepadList):
(WebCore::sampleGamepads):

* platform/gamepad/glib/GamepadsGlib.cpp: Renamed from Source/WebCore/platform/glib/GamepadsGlib.cpp.
(WebCore::GamepadDeviceGlib::GamepadDeviceGlib):
(WebCore::GamepadDeviceGlib::~GamepadDeviceGlib):
(WebCore::GamepadDeviceGlib::readCallback):
(WebCore::GamepadsGlib::GamepadsGlib):
(WebCore::GamepadsGlib::~GamepadsGlib):
(WebCore::GamepadsGlib::registerDevice):
(WebCore::GamepadsGlib::unregisterDevice):
(WebCore::GamepadsGlib::updateGamepadList):
(WebCore::GamepadsGlib::onUEventCallback):
(WebCore::GamepadsGlib::isGamepadDevice):
(WebCore::sampleGamepads):

* platform/gamepad/linux/GamepadDeviceLinux.cpp: Renamed from Source/WebCore/platform/linux/GamepadDeviceLinux.cpp.
(WebCore::GamepadDeviceLinux::GamepadDeviceLinux):
(WebCore::GamepadDeviceLinux::~GamepadDeviceLinux):
(WebCore::GamepadDeviceLinux::updateForEvent):
(WebCore::GamepadDeviceLinux::normalizeAxisValue):
(WebCore::GamepadDeviceLinux::normalizeButtonValue):
* platform/gamepad/linux/GamepadDeviceLinux.h: Renamed from Source/WebCore/platform/linux/GamepadDeviceLinux.h.
(WebCore::GamepadDeviceLinux::connected):
(WebCore::GamepadDeviceLinux::id):
(WebCore::GamepadDeviceLinux::timestamp):
(WebCore::GamepadDeviceLinux::axesCount):
(WebCore::GamepadDeviceLinux::axesData):
(WebCore::GamepadDeviceLinux::buttonsCount):
(WebCore::GamepadDeviceLinux::buttonsData):

* platform/gamepad/mac/HIDGamepad.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepad.cpp.
(WebCore::HIDGamepad::HIDGamepad):
(WebCore::HIDGamepad::getCurrentValueForElement):
(WebCore::HIDGamepad::initElements):
(WebCore::HIDGamepad::initElementsFromArray):
(WebCore::HIDGamepad::maybeAddButton):
(WebCore::HIDGamepad::maybeAddAxis):
(WebCore::HIDGamepad::valueChanged):
* platform/gamepad/mac/HIDGamepad.h: Renamed from Source/WebCore/platform/mac/HIDGamepad.h.
(WebCore::HIDGamepadElement::HIDGamepadElement):
(WebCore::HIDGamepadElement::~HIDGamepadElement):
(WebCore::HIDGamepadElement::isButton):
(WebCore::HIDGamepadElement::isAxis):
(WebCore::HIDGamepadButton::HIDGamepadButton):
(WebCore::HIDGamepadAxis::HIDGamepadAxis):
(WebCore::HIDGamepad::hidDevice):

* platform/gamepad/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadProvider.cpp.
(WebCore::deviceMatchingDictionary):
(WebCore::deviceAddedCallback):
(WebCore::deviceRemovedCallback):
(WebCore::deviceValuesChangedCallback):
(WebCore::HIDGamepadProvider::singleton):
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired):
(WebCore::HIDGamepadProvider::openAndScheduleManager):
(WebCore::HIDGamepadProvider::closeAndUnscheduleManager):
(WebCore::HIDGamepadProvider::startMonitoringGamepads):
(WebCore::HIDGamepadProvider::stopMonitoringGamepads):
(WebCore::HIDGamepadProvider::deviceAdded):
(WebCore::HIDGamepadProvider::deviceRemoved):
(WebCore::HIDGamepadProvider::valuesChanged):
(WebCore::HIDGamepadProvider::inputNotificationTimerFired):
(WebCore::HIDGamepadProvider::removeGamepadForDevice):
* platform/gamepad/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadProvider.h.
(WebCore::HIDGamepadProvider::platformGamepads):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/Linux.cmake
Source/WebCore/platform/gamepad/EmptyGamepadProvider.cpp [new file with mode: 0644]
Source/WebCore/platform/gamepad/EmptyGamepadProvider.h [new file with mode: 0644]
Source/WebCore/platform/gamepad/GamepadProvider.cpp [moved from Source/WebCore/platform/GamepadProvider.cpp with 82% similarity]
Source/WebCore/platform/gamepad/GamepadProvider.h [moved from Source/WebCore/platform/GamepadProvider.h with 89% similarity]
Source/WebCore/platform/gamepad/GamepadProviderClient.h [moved from Source/WebCore/platform/GamepadProviderClient.h with 94% similarity]
Source/WebCore/platform/gamepad/PlatformGamepad.h [moved from Source/WebCore/platform/PlatformGamepad.h with 96% similarity]
Source/WebCore/platform/gamepad/deprecated/Gamepads.h [moved from Source/WebCore/platform/Gamepads.h with 100% similarity]
Source/WebCore/platform/gamepad/efl/GamepadsEfl.cpp [moved from Source/WebCore/platform/efl/GamepadsEfl.cpp with 100% similarity]
Source/WebCore/platform/gamepad/glib/GamepadsGlib.cpp [moved from Source/WebCore/platform/glib/GamepadsGlib.cpp with 100% similarity]
Source/WebCore/platform/gamepad/linux/GamepadDeviceLinux.cpp [moved from Source/WebCore/platform/linux/GamepadDeviceLinux.cpp with 100% similarity]
Source/WebCore/platform/gamepad/linux/GamepadDeviceLinux.h [moved from Source/WebCore/platform/linux/GamepadDeviceLinux.h with 100% similarity]
Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp [moved from Source/WebCore/platform/mac/HIDGamepad.cpp with 100% similarity]
Source/WebCore/platform/gamepad/mac/HIDGamepad.h [moved from Source/WebCore/platform/mac/HIDGamepad.h with 98% similarity]
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.cpp [moved from Source/WebCore/platform/mac/HIDGamepadProvider.cpp with 100% similarity]
Source/WebCore/platform/gamepad/mac/HIDGamepadProvider.h [moved from Source/WebCore/platform/mac/HIDGamepadProvider.h with 97% similarity]