[EFL] Move BatteryClientEfl from WebKit to WebCore
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 05:49:44 +0000 (05:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Jul 2012 05:49:44 +0000 (05:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=90063

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-03
Reviewed by Kenneth Rohde Christiansen.

Move BatteryClientEfl class from WebKit to WebCore
so that it can be reused in WebKit2.

Source/WebCore:

No new tests, no behavior change.

* PlatformEfl.cmake:
* platform/efl/BatteryClientEfl.cpp: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp.
(WebCore):
(WebCore::BatteryClientEfl::BatteryClientEfl):
(WebCore::BatteryClientEfl::setController):
(WebCore::BatteryClientEfl::startUpdating):
(WebCore::BatteryClientEfl::stopUpdating):
(WebCore::BatteryClientEfl::batteryControllerDestroyed):
(WebCore::BatteryClientEfl::setBatteryStatus):
(WebCore::BatteryClientEfl::timerFired):
(WebCore::BatteryClientEfl::getBatteryStatus):
(WebCore::BatteryClientEfl::setBatteryClient):
* platform/efl/BatteryClientEfl.h: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h.
(WebCore):
(BatteryClientEfl):
(WebCore::BatteryClientEfl::~BatteryClientEfl):
(WebCore::BatteryClientEfl::batteryStatus):

Source/WebKit:

* PlatformEfl.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121828 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/platform/efl/BatteryClientEfl.cpp [moved from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp with 98% similarity]
Source/WebCore/platform/efl/BatteryClientEfl.h [moved from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h with 93% similarity]
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake

index 36a5580..d9bdcae 100644 (file)
@@ -1,3 +1,33 @@
+2012-07-03  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] Move BatteryClientEfl from WebKit to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=90063
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Move BatteryClientEfl class from WebKit to WebCore
+        so that it can be reused in WebKit2.
+
+        No new tests, no behavior change.
+
+        * PlatformEfl.cmake:
+        * platform/efl/BatteryClientEfl.cpp: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.cpp.
+        (WebCore):
+        (WebCore::BatteryClientEfl::BatteryClientEfl):
+        (WebCore::BatteryClientEfl::setController):
+        (WebCore::BatteryClientEfl::startUpdating):
+        (WebCore::BatteryClientEfl::stopUpdating):
+        (WebCore::BatteryClientEfl::batteryControllerDestroyed):
+        (WebCore::BatteryClientEfl::setBatteryStatus):
+        (WebCore::BatteryClientEfl::timerFired):
+        (WebCore::BatteryClientEfl::getBatteryStatus):
+        (WebCore::BatteryClientEfl::setBatteryClient):
+        * platform/efl/BatteryClientEfl.h: Renamed from Source/WebKit/efl/WebCoreSupport/BatteryClientEfl.h.
+        (WebCore):
+        (BatteryClientEfl):
+        (WebCore::BatteryClientEfl::~BatteryClientEfl):
+        (WebCore::BatteryClientEfl::batteryStatus):
+
 2012-07-03  Huang Dongsung  <luxtella@company100.net>
 
         Add a comment in order to clarify why
index 94e690f..60cd635 100644 (file)
@@ -23,6 +23,7 @@ LIST(APPEND WebCore_SOURCES
   page/efl/DragControllerEfl.cpp
   page/efl/EventHandlerEfl.cpp
   platform/Cursor.cpp
+  platform/efl/BatteryClientEfl.cpp
   platform/efl/ClipboardEfl.cpp
   platform/efl/ColorChooserEfl.cpp
   platform/efl/ContextMenuEfl.cpp
@@ -24,6 +24,7 @@
 
 #include "BatteryController.h"
 #include "EventNames.h"
+#include <E_Ukit.h>
 #include <limits>
 
 namespace WebCore {
@@ -35,6 +36,11 @@ BatteryClientEfl::BatteryClientEfl()
 {
 }
 
+BatteryStatus* BatteryClientEfl::batteryStatus() const
+{
+    return m_batteryStatus.get();
+}
+
 void BatteryClientEfl::setController(BatteryController* controller)
 {
     m_controller = controller;
 #include "BatteryClient.h"
 #include "BatteryStatus.h"
 #include "Timer.h"
-#include <E_Ukit.h>
 #include <wtf/text/AtomicString.h>
 
+typedef struct DBusError DBusError;
+
 namespace WebCore {
 
 class BatteryController;
-class BatteryStatus;
 
 class BatteryClientEfl : public BatteryClient {
 public:
@@ -44,7 +44,7 @@ public:
     virtual void batteryControllerDestroyed();
 
     void setBatteryStatus(const AtomicString& eventType, PassRefPtr<BatteryStatus>);
-    BatteryStatus* batteryStatus() { return m_batteryStatus.get(); }
+    BatteryStatus* batteryStatus() const;
 
 private:
     void timerFired(Timer<BatteryClientEfl>*);
@@ -59,6 +59,6 @@ private:
 
 }
 
-#endif // BATTERY_STATUS
+#endif // ENABLE(BATTERY_STATUS)
 #endif // BatteryClientEfl_h
 
index 29798c0..35ac6c3 100644 (file)
@@ -1,3 +1,15 @@
+2012-07-03  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] Move BatteryClientEfl from WebKit to WebCore
+        https://bugs.webkit.org/show_bug.cgi?id=90063
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Move BatteryClientEfl class from WebKit to WebCore
+        so that it can be reused in WebKit2.
+
+        * PlatformEfl.cmake:
+
 2012-07-02  Xiaobo Wang  <xbwang@torchmobile.com.cn>
 
         [BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
index 19fd36b..12212ef 100644 (file)
@@ -161,7 +161,6 @@ ENDIF ()
 
 IF (ENABLE_BATTERY_STATUS)
     LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
-    LIST(APPEND WebKit_SOURCES efl/WebCoreSupport/BatteryClientEfl.cpp)
 ENDIF ()
 
 IF (ENABLE_REGISTER_PROTOCOL_HANDLER)