[WK2] Make the WebBatteryManager a supplement to the WebProcess
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2013 07:51:48 +0000 (07:51 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 May 2013 07:51:48 +0000 (07:51 +0000)
commitb79ceafafdbfd7d015fd098881c3e2341ae13c41
tree112b090b7203060bacad7cfaad2fdfbc3429c208
parentd2c1d6a769f9245208b99e61633f592410b27a22
[WK2] Make the WebBatteryManager a supplement to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=115715

Reviewed by Andreas Kling.

WebBatteryManager should inherit from WebProcessSupplement and should be used as such
by the WebProcess. This removes the need for the m_batteryManager member variable in
the WebProcess class and brings the WebBatteryManager in line with other manager classes
of which instances are controlled by the WebProcess class.

* WebProcess/Battery/WebBatteryManager.cpp:
(WebKit::WebBatteryManager::supplementName): Specify the supplement's name.
(WebKit):
* WebProcess/Battery/WebBatteryManager.h:
(WebBatteryManager): Inherit from the WebProcessSupplement interface.
* WebProcess/WebCoreSupport/WebBatteryClient.cpp:
(WebKit::WebBatteryClient::startUpdating): Access the WebBatteryManager as a supplement.
(WebKit::WebBatteryClient::stopUpdating): Ditto.
(WebKit::WebBatteryClient::batteryControllerDestroyed): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Add the WebBatteryManager instance as a supplement.
* WebProcess/WebProcess.h:
(WebProcess): Remove the m_batteryManager member variable and its getter method.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@149717 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Battery/WebBatteryManager.cpp
Source/WebKit2/WebProcess/Battery/WebBatteryManager.h
Source/WebKit2/WebProcess/WebCoreSupport/WebBatteryClient.cpp
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h