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

Issue 252113006: Add Battery Status API support in content/renderer and IPC messages. (Closed)

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

Description

Add Battery Status API support in content/renderer and IPC messages. This patch defines the async IPCs needed for the Battery Status API. It also implements the platform-side part with a setBatteryStatusListener() method and a dispatcher class for propagating messages to blink. Unit tests for the dispatcher class are also included. BUG=122593, 360068 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=270504

Patch Set 1 #

Patch Set 2 : fix linkage issues with battery_status_dispatcher_unittest #

Total comments: 18

Patch Set 3 : fixed Jochen's comments #

Total comments: 2

Patch Set 4 : added Stop on destruct #

Patch Set 5 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+279 lines, -0 lines) Patch
M content/common/DEPS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A content/common/battery_status_messages.h View 1 1 chunk +32 lines, -0 lines 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A + content/renderer/battery_status/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A content/renderer/battery_status/battery_status_dispatcher.h View 1 2 1 chunk +44 lines, -0 lines 0 comments Download
A content/renderer/battery_status/battery_status_dispatcher.cc View 1 2 3 1 chunk +55 lines, -0 lines 0 comments Download
A content/renderer/battery_status/battery_status_dispatcher_unittest.cc View 1 2 1 chunk +123 lines, -0 lines 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.h View 3 chunks +6 lines, -1 line 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 3 chunks +13 lines, -0 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
timvolodine
6 years, 7 months ago (2014-04-29 14:02:24 UTC) #1
timvolodine
6 years, 7 months ago (2014-04-29 17:02:19 UTC) #2
jochen (gone - plz use gerrit)
https://codereview.chromium.org/252113006/diff/20001/content/renderer/battery_status/battery_status_dispatcher.cc File content/renderer/battery_status/battery_status_dispatcher.cc (right): https://codereview.chromium.org/252113006/diff/20001/content/renderer/battery_status/battery_status_dispatcher.cc#newcode9 content/renderer/battery_status/battery_status_dispatcher.cc:9: #include "content/public/renderer/render_thread.h" please use the content/renderer version inside content ...
6 years, 7 months ago (2014-04-30 04:54:07 UTC) #3
timvolodine
thanks for the comments, ptal. https://codereview.chromium.org/252113006/diff/20001/content/renderer/battery_status/battery_status_dispatcher.cc File content/renderer/battery_status/battery_status_dispatcher.cc (right): https://codereview.chromium.org/252113006/diff/20001/content/renderer/battery_status/battery_status_dispatcher.cc#newcode9 content/renderer/battery_status/battery_status_dispatcher.cc:9: #include "content/public/renderer/render_thread.h" On 2014/04/30 ...
6 years, 7 months ago (2014-05-01 10:32:38 UTC) #4
Michael van Ouwerkerk
We discussed a few questions I had in person. lgtm
6 years, 7 months ago (2014-05-01 13:46:41 UTC) #5
jochen (gone - plz use gerrit)
i wonder what the browser side looks like? https://codereview.chromium.org/252113006/diff/40001/content/renderer/battery_status/battery_status_dispatcher.cc File content/renderer/battery_status/battery_status_dispatcher.cc (right): https://codereview.chromium.org/252113006/diff/40001/content/renderer/battery_status/battery_status_dispatcher.cc#newcode20 content/renderer/battery_status/battery_status_dispatcher.cc:20: BatteryStatusDispatcher::~BatteryStatusDispatcher() ...
6 years, 7 months ago (2014-05-02 14:08:53 UTC) #6
timvolodine
the browser-side is coming soon https://codereview.chromium.org/252113006/diff/40001/content/renderer/battery_status/battery_status_dispatcher.cc File content/renderer/battery_status/battery_status_dispatcher.cc (right): https://codereview.chromium.org/252113006/diff/40001/content/renderer/battery_status/battery_status_dispatcher.cc#newcode20 content/renderer/battery_status/battery_status_dispatcher.cc:20: BatteryStatusDispatcher::~BatteryStatusDispatcher() { } On ...
6 years, 7 months ago (2014-05-02 15:03:55 UTC) #7
timvolodine
+jschuh for IPC messages review: battery_status_messages.h.
6 years, 7 months ago (2014-05-02 15:25:03 UTC) #8
jochen (gone - plz use gerrit)
lgtm
6 years, 7 months ago (2014-05-05 07:33:27 UTC) #9
jschuh
Lgtm for ipc security (notes: opaque boolean and double values). Have you run this by ...
6 years, 7 months ago (2014-05-05 17:31:58 UTC) #10
timvolodine
On 2014/05/05 17:31:58, Justin Schuh wrote: > Lgtm for ipc security (notes: opaque boolean and ...
6 years, 7 months ago (2014-05-14 17:16:33 UTC) #11
timvolodine
The CQ bit was checked by timvolodine@chromium.org
6 years, 7 months ago (2014-05-14 17:49:53 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/timvolodine@chromium.org/252113006/70001
6 years, 7 months ago (2014-05-14 17:50:39 UTC) #13
commit-bot: I haz the power
6 years, 7 months ago (2014-05-14 23:41:05 UTC) #14
Message was sent while issue was closed.
Change committed as 270504

Powered by Google App Engine
This is Rietveld 408576698