Move ENABLE(GAMEPAD) logic out of Navigator.h/cpp
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 07:03:16 +0000 (07:03 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 07:03:16 +0000 (07:03 +0000)
commitd94ad73949764d8740802105f48cee36ec542b91
treec6748fdde71c746ae38822258a3a27f7a4eba8a5
parent5aa6272fa3c2482277a0ebfd4c2690272d58b53f
Move ENABLE(GAMEPAD) logic out of Navigator.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=78457

Reviewed by Hajime Morita.

This patch moves GAMEPAD-specific logic out of Navigator by introducing
the concept of a NavigatorSupplement, analogous to the recently
introduced PageSupplement.

* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::from):
(WebCore):
(WebCore::NavigatorGamepad::webkitGamepads):
(WebCore::NavigatorGamepad::gamepads):
* Modules/gamepad/NavigatorGamepad.h:
(NavigatorGamepad):
* WebCore.gypi:
* dom/DeviceMotionController.cpp:
(WebCore::DeviceMotionController::supplementName):
* page/Navigator.cpp:
(WebCore::Navigator::provideSupplement):
(WebCore):
(WebCore::Navigator::requireSupplement):
* page/Navigator.h:
(Navigator):
* page/Page.h:
(Page):
* page/PageSupplement.h:
    - This patch cleans up some nits in PageSupplement.
(WebCore):
(PageSupplement):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp
Source/WebCore/Modules/gamepad/NavigatorGamepad.h
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/DeviceMotionController.cpp
Source/WebCore/page/Navigator.cpp
Source/WebCore/page/Navigator.h
Source/WebCore/page/NavigatorSupplement.cpp [new file with mode: 0644]
Source/WebCore/page/NavigatorSupplement.h [new file with mode: 0644]
Source/WebCore/page/Page.h
Source/WebCore/page/PageSupplement.h