Changeset 160444 in webkit
- Timestamp:
- Dec 11, 2013 10:16:48 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Platform/ChangeLog
r159971 r160444 1 2013-12-11 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Add a UPower-based BatteryProvider 4 https://bugs.webkit.org/show_bug.cgi?id=115719 5 6 Reviewed by Martin Robinson. 7 8 * GNUmakefile.am: Add the Source/WebCore/platform/glib directory to the list of directories searched 9 for header inclusion. Add the upower-glib dependency CFLAGS to the list of libPlatform's CPPFLAGS. 10 1 11 2013-12-02 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 12 -
trunk/Source/Platform/GNUmakefile.am
r158848 r160444 29 29 -I$(srcdir)/Source/WebCore/platform/cairo \ 30 30 -I$(srcdir)/Source/WebCore/platform/geoclue \ 31 -I$(srcdir)/Source/WebCore/platform/glib \ 31 32 -I$(srcdir)/Source/WebCore/platform/graphics \ 32 33 -I$(srcdir)/Source/WebCore/platform/graphics/cairo \ … … 96 97 $(GEOCLUE_CFLAGS) \ 97 98 $(GSTREAMER_CFLAGS) \ 98 $(LIBSOUP_CFLAGS) 99 $(LIBSOUP_CFLAGS) \ 100 $(UPOWER_GLIB_CFLAGS) 99 101 100 102 libPlatformGtk_la_SOURCES = \ -
trunk/Source/WebCore/ChangeLog
r160436 r160444 1 2013-12-11 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Add a UPower-based BatteryProvider 4 https://bugs.webkit.org/show_bug.cgi?id=115719 5 6 Reviewed by Martin Robinson. 7 8 Introduce the BatteryProviderUPower, a provider of the system's battery status that produces the information 9 using the upower-glib library. 10 11 The BatteryProviderUPower creates a new UPower client when the provider should start emitting updates and hooks 12 up to device alteration signals. These only fire recalculation of the battery status when a battery device is altered. 13 14 When recalculating, every battery device is taken into account, accumulating the energy capacities when both empty 15 and full, the current rate of energy charging/discharging, and the battery status (whether the device is charging or 16 discharging). This gives a set of data that covers the overall battery status of the system. 17 18 This data is then used to calculate the battery status as perceived by the WebCore implementation. Charging is determined 19 by examining the integral sign of the current combined energy rate. Charging and discharging times are calculated, when 20 appropriate, by dividing the chargable/dischargable capacity with the current combined energy rate. The battery level is 21 calculated by dividing the current energy capacity with the full energy capacity (i.e. the combined capacity of all 22 the batteries that the system possesses). The status is (indirectly) passed onto BatteryManager by invoking the 23 updateBatteryStatus method on the client, with the first parameter representing the battery charging/discharging state, 24 the second parameter representing the time left until the battery is fully charged (when charging) or fully 25 depleted (when discharging), and the third parameter representing the current battery level. 26 27 Whenever the implementation cannot provide any information about the battery status of the system, the client's 28 updateBatteryStatus method is invoked with the first parameter reporting the unavailability of any information 29 about the battery status. The other two parameters can be omitted as they default to 0 when not given and are neither 30 available nor useful in such circumstances. The client should handle such an update by reporting the 'default' battery 31 status - charging, the battery level being at 1.0 and both the charging and discharging time having the value of 32 the positive infinity (as per the Battery Status API specification). 33 34 The implementation is heavily inspired by a similar approach to calculating battery status in GNOME Settings Daemon. 35 36 No new tests - no new functionality. The feature is not yet enabled. When enabled, the relevant tests pass. 37 38 * GNUmakefile.list.am: Add the BatteryProviderUPower(Client) build targets. 39 * platform/glib/BatteryProviderUPower.cpp: Added. 40 (powerDeviceAlterationCallback): 41 (BatteryProviderUPower::BatteryProviderUPower): 42 (BatteryProviderUPower::startUpdating): 43 (BatteryProviderUPower::stopUpdating): 44 (BatteryProviderUPower::updateBatteryStatus): 45 * platform/glib/BatteryProviderUPower.h: Added. 46 (WebCore): 47 (BatteryProviderUPower): 48 * platform/glib/BatteryProviderUPowerClient.h: Added. 49 (WebCore): 50 (BatteryProviderUPowerClient): 51 1 52 2013-12-11 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> 2 53 -
trunk/Source/WebCore/GNUmakefile.list.am
r160336 r160444 5586 5586 Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.cpp \ 5587 5587 Source/WebCore/platform/geoclue/GeolocationProviderGeoclueClient.h \ 5588 Source/WebCore/platform/glib/BatteryProviderUPowerClient.h \ 5589 Source/WebCore/platform/glib/BatteryProviderUPower.cpp \ 5590 Source/WebCore/platform/glib/BatteryProviderUPower.h \ 5588 5591 Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp \ 5589 5592 Source/WebCore/platform/graphics/cairo/CairoUtilities.cpp \ -
trunk/Source/WebKit/gtk/ChangeLog
r160437 r160444 1 2013-12-11 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Add a UPower-based BatteryProvider 4 https://bugs.webkit.org/show_bug.cgi?id=115719 5 6 Reviewed by Martin Robinson. 7 8 * GNUmakefile.am: Link the libwebkigtk library against the upower-glib library. 9 1 10 2013-12-11 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com> 2 11 -
trunk/Source/WebKit/gtk/GNUmakefile.am
r160437 r160444 127 127 $(SQLITE3_LIBS) \ 128 128 $(UNICODE_LIBS) \ 129 $(UPOWER_GLIB_LIBS) \ 129 130 $(WEBP_LIBS) \ 130 131 $(XCOMPOSITE_LIBS) \ -
trunk/Source/WebKit2/ChangeLog
r160435 r160444 1 2013-12-11 José Dapena Paz <jdapena@igalia.com> and Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Add a UPower-based BatteryProvider 4 https://bugs.webkit.org/show_bug.cgi?id=115719 5 6 Reviewed by Martin Robinson. 7 8 * GNUmakefile.am: Link the libwebkit2gtk library against the upower-glib library. 9 1 10 2013-12-11 Gustavo Noronha Silva <gns@gnome.org> 2 11 -
trunk/Source/WebKit2/GNUmakefile.am
r160304 r160444 286 286 $(SQLITE3_LIBS) \ 287 287 $(UNICODE_LIBS) \ 288 $(UPOWER_GLIB_LIBS) \ 288 289 $(WEBP_LIBS) \ 289 290 $(XRENDER_LIBS) \
Note: See TracChangeset
for help on using the changeset viewer.