Changeset 113547 in webkit


Ignore:
Timestamp:
Apr 7, 2012, 8:30:43 AM (13 years ago)
Author:
[email protected]
Message:

[BlackBerry] Add Battery Status API support
https://bugs.webkit.org/show_bug.cgi?id=82615

Reviewed by George Staikos.

.:

Enable BATTERY_STATUS.

  • Source/cmake/OptionsBlackBerry.cmake:

Source/WebKit:

Add BatteryClientBlackBerry.cpp to the build.

  • PlatformBlackBerry.cmake:

Source/WebKit/blackberry:

Add client implementation for Battery API.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::init): initialize BatteryClient.

  • WebCoreSupport/BatteryClientBlackBerry.cpp: Added.

(WebCore):
(WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
(WebCore::BatteryClientBlackBerry::setController):
(WebCore::BatteryClientBlackBerry::startUpdating):
(WebCore::BatteryClientBlackBerry::stopUpdating):
(WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
(WebCore::BatteryClientBlackBerry::onLevelChange):
(WebCore::BatteryClientBlackBerry::onChargingChange):
(WebCore::BatteryClientBlackBerry::onChargingTimeChange):
(WebCore::BatteryClientBlackBerry::onDischargingTimeChange):

  • WebCoreSupport/BatteryClientBlackBerry.h: Added.

(WebCore):
(BatteryClientBlackBerry):
(WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):

Tools:

Enable BATTERY_STATUS.

  • Scripts/build-webkit:
Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r113464 r113547  
     12012-04-07  Rob Buis  <[email protected]>
     2
     3        [BlackBerry] Add Battery Status API support
     4        https://bugs.webkit.org/show_bug.cgi?id=82615
     5
     6        Reviewed by George Staikos.
     7
     8        Enable BATTERY_STATUS.
     9
     10        * Source/cmake/OptionsBlackBerry.cmake:
     11
    1122012-04-06  Martin Robinson  <[email protected]>
    213
  • trunk/Source/WebKit/ChangeLog

    r113525 r113547  
     12012-04-07  Rob Buis  <[email protected]>
     2
     3        [BlackBerry] Add Battery Status API support
     4        https://bugs.webkit.org/show_bug.cgi?id=82615
     5
     6        Reviewed by George Staikos.
     7
     8        Add BatteryClientBlackBerry.cpp to the build.
     9
     10        * PlatformBlackBerry.cmake:
     11
    1122012-04-06  Charles Wei  <[email protected]>
    213
  • trunk/Source/WebKit/PlatformBlackBerry.cmake

    r113525 r113547  
    3636        "${TOOLS_DIR}/DumpRenderTree/blackberry"
    3737    )
     38ENDIF ()
     39
     40IF (ENABLE_BATTERY_STATUS)
     41    LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${WEBCORE_DIR}/Modules/battery)
     42    LIST(APPEND WebKit_SOURCES blackberry/WebCoreSupport/BatteryClientBlackBerry.cpp)
    3843ENDIF ()
    3944
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r113406 r113547  
    2626#include "BackingStoreCompositingSurface.h"
    2727#include "BackingStore_p.h"
     28#if ENABLE(BATTERY_STATUS)
     29#include "BatteryClientBlackBerry.h"
     30#endif
    2831#include "CString.h"
    2932#include "CachedImage.h"
     
    449452#if ENABLE(VIBRATION)
    450453    WebCore::provideVibrationTo(m_page, new VibrationClientBlackBerry());
     454#endif
     455
     456#if ENABLE(BATTERY_STATUS)
     457    WebCore::provideBatteryTo(m_page, new WebCore::BatteryClientBlackBerry);
    451458#endif
    452459
  • trunk/Source/WebKit/blackberry/ChangeLog

    r113505 r113547  
     12012-04-07  Rob Buis  <[email protected]>
     2
     3        [BlackBerry] Add Battery Status API support
     4        https://bugs.webkit.org/show_bug.cgi?id=82615
     5
     6        Reviewed by George Staikos.
     7
     8        Add client implementation for Battery API.
     9
     10        * Api/WebPage.cpp:
     11        (BlackBerry::WebKit::WebPagePrivate::init):  initialize BatteryClient.
     12        * WebCoreSupport/BatteryClientBlackBerry.cpp: Added.
     13        (WebCore):
     14        (WebCore::BatteryClientBlackBerry::BatteryClientBlackBerry):
     15        (WebCore::BatteryClientBlackBerry::setController):
     16        (WebCore::BatteryClientBlackBerry::startUpdating):
     17        (WebCore::BatteryClientBlackBerry::stopUpdating):
     18        (WebCore::BatteryClientBlackBerry::batteryControllerDestroyed):
     19        (WebCore::BatteryClientBlackBerry::onLevelChange):
     20        (WebCore::BatteryClientBlackBerry::onChargingChange):
     21        (WebCore::BatteryClientBlackBerry::onChargingTimeChange):
     22        (WebCore::BatteryClientBlackBerry::onDischargingTimeChange):
     23        * WebCoreSupport/BatteryClientBlackBerry.h: Added.
     24        (WebCore):
     25        (BatteryClientBlackBerry):
     26        (WebCore::BatteryClientBlackBerry::~BatteryClientBlackBerry):
     27
    1282012-04-06  Benjamin Poulain  <[email protected]>
    229
  • trunk/Source/cmake/OptionsBlackBerry.cmake

    r113404 r113547  
    134134
    135135WEBKIT_FEATURE(ENABLE_ASSEMBLER_WX_EXCLUSIVE "Assembler WX Exclusive" DEFAULT ON)
     136WEBKIT_FEATURE(ENABLE_BATTERY_STATUS "Enable battery status api" DEFAULT ON)
    136137WEBKIT_FEATURE(ENABLE_BLOB "Enable blob slice" DEFAULT ON)
    137138WEBKIT_FEATURE(ENABLE_CHANNEL_MESSAGING "Enable channel messaging" DEFAULT ON)
  • trunk/Tools/ChangeLog

    r113531 r113547  
     12012-04-07  Rob Buis  <[email protected]>
     2
     3        [BlackBerry] Add Battery Status API support
     4        https://bugs.webkit.org/show_bug.cgi?id=82615
     5
     6        Reviewed by George Staikos.
     7
     8        Enable BATTERY_STATUS.
     9
     10        * Scripts/build-webkit:
     11
    1122012-04-06  Ami Fischman  <[email protected]>
    213
  • trunk/Tools/Scripts/build-webkit

    r113489 r113547  
    165165
    166166    { option => "battery-status-api", desc => "Toggle battery status API support",
    167       define => "ENABLE_BATTERY_STATUS", default => isEfl(), value => \$batterystatusAPISupport },
     167      define => "ENABLE_BATTERY_STATUS", default => (isEfl() || isBlackBerry()), value => \$batterystatusAPISupport },
    168168
    169169    { option => "blob", desc => "Toggle Blob support",
Note: See TracChangeset for help on using the changeset viewer.