Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Issue 278043002: Battery Status API: browser-side implementation. (Closed)

Created:
6 years, 7 months ago by timvolodine
Modified:
6 years, 6 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Battery Status API: browser-side implementation. This patch implements the browser side bits needed for the Battery Status API. It includes a message filter, a singleton service which owns and controls the platform-specific battery status manager. Updates are implemented using callbacks and async IPCs between the browser and the renderer. A unit test for the service using a fake battery status manager and callbacks is also provided. Corresponding renderer-side patch: https://codereview.chromium.org/252113006/ BUG=122593, 360068 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273336

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix compilation, remove DISALLOW_COPY.. from battery_status_manager_interface #

Patch Set 4 : removed CONTENT_EXPORT from battery_status_manager.h #

Patch Set 5 : rebase #

Total comments: 22

Patch Set 6 : fixed comments #

Total comments: 6

Patch Set 7 : fixed comments and rebased #

Patch Set 8 : add CONTENT_EXPORT to battery_status_manager.h #

Unified diffs Side-by-side diffs Delta from patch set Stats (+484 lines, -29 lines) Patch
M content/browser/battery_status/battery_status_manager.h View 1 2 3 4 5 6 7 2 chunks +10 lines, -7 lines 0 comments Download
M content/browser/battery_status/battery_status_manager_android.cc View 1 2 3 4 5 6 1 chunk +5 lines, -2 lines 0 comments Download
M content/browser/battery_status/battery_status_manager_default.cc View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
A content/browser/battery_status/battery_status_message_filter.h View 1 2 3 4 5 1 chunk +36 lines, -0 lines 0 comments Download
A content/browser/battery_status/battery_status_message_filter.cc View 1 2 3 4 5 1 chunk +56 lines, -0 lines 0 comments Download
A content/browser/battery_status/battery_status_service.h View 1 2 3 4 5 1 chunk +66 lines, -0 lines 0 comments Download
A content/browser/battery_status/battery_status_service.cc View 1 2 3 4 5 1 chunk +101 lines, -0 lines 0 comments Download
A content/browser/battery_status/battery_status_service_unittest.cc View 1 2 3 4 5 6 1 chunk +193 lines, -0 lines 0 comments Download
D content/browser/battery_status/battery_status_update_callback.h View 1 2 3 4 5 1 chunk +0 lines, -18 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
timvolodine
some bots are red, because they haven't rolled yet
6 years, 7 months ago (2014-05-16 12:35:27 UTC) #1
Michael van Ouwerkerk
https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager.h File content/browser/battery_status/battery_status_manager.h (right): https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager.h#newcode31 content/browser/battery_status/battery_status_manager.h:31: // Stop listenting for battery status changes. Nit: s/listenting/listening/ ...
6 years, 7 months ago (2014-05-19 11:19:22 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager_interface.h File content/browser/battery_status/battery_status_manager_interface.h (right): https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager_interface.h#newcode11 content/browser/battery_status/battery_status_manager_interface.h:11: class BatteryStatusManagerInterface { it's uncommon to have classes named ...
6 years, 7 months ago (2014-05-19 13:14:22 UTC) #3
timvolodine
https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager.h File content/browser/battery_status/battery_status_manager.h (right): https://codereview.chromium.org/278043002/diff/110001/content/browser/battery_status/battery_status_manager.h#newcode31 content/browser/battery_status/battery_status_manager.h:31: // Stop listenting for battery status changes. On 2014/05/19 ...
6 years, 7 months ago (2014-05-22 10:02:33 UTC) #4
Michael van Ouwerkerk
Thanks Tim! lgtm https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h File content/browser/battery_status/battery_status_manager.h (right): https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h#newcode25 content/browser/battery_status/battery_status_manager.h:25: // Methods from BatteryStatusManagerInterface. Nit: does ...
6 years, 7 months ago (2014-05-22 10:36:52 UTC) #5
jochen (gone - plz use gerrit)
lgtm with comments https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h File content/browser/battery_status/battery_status_manager.h (right): https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h#newcode23 content/browser/battery_status/battery_status_manager.h:23: virtual ~BatteryStatusManager() { } please keep ...
6 years, 7 months ago (2014-05-23 08:13:35 UTC) #6
timvolodine
thanks for the review! https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h File content/browser/battery_status/battery_status_manager.h (right): https://codereview.chromium.org/278043002/diff/130001/content/browser/battery_status/battery_status_manager.h#newcode23 content/browser/battery_status/battery_status_manager.h:23: virtual ~BatteryStatusManager() { } On ...
6 years, 7 months ago (2014-05-27 12:32:04 UTC) #7
timvolodine
The CQ bit was checked by timvolodine@chromium.org
6 years, 6 months ago (2014-05-28 17:50:08 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/278043002/170001
6 years, 6 months ago (2014-05-28 17:51:19 UTC) #9
commit-bot: I haz the power
6 years, 6 months ago (2014-05-28 20:07:54 UTC) #10
Message was sent while issue was closed.
Change committed as 273336

Powered by Google App Engine
This is Rietveld 408576698