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

Issue 212643010: Add Dispatcher class to the Battery Status API module. (Closed)

Created:
6 years, 9 months ago by Srini
Modified:
6 years, 8 months ago
CC:
blink-reviews, jamesr, dglazkov+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Add Dispatcher class to the Battery Status API module. BUG=122593 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172021

Patch Set 1 #

Total comments: 19

Patch Set 2 : Store status only in Dispatcher and fixes other comments. #

Total comments: 21

Patch Set 3 : Fixed all comments and waiting for dispatchDeviceEvent impl. #

Total comments: 9

Patch Set 4 : Fix comments and add m_hasEventListener appropriately. #

Total comments: 2

Patch Set 5 : Code cleanup. #

Total comments: 3

Patch Set 6 : Remove comments and stopUpdating in the destructor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+284 lines, -33 lines) Patch
A Source/modules/battery/BatteryDispatcher.h View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
A Source/modules/battery/BatteryDispatcher.cpp View 1 2 3 4 5 1 chunk +96 lines, -0 lines 0 comments Download
M Source/modules/battery/BatteryManager.h View 1 2 chunks +16 lines, -5 lines 0 comments Download
M Source/modules/battery/BatteryManager.cpp View 1 2 3 4 5 3 chunks +67 lines, -20 lines 0 comments Download
M Source/modules/battery/BatteryStatus.h View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/battery/BatteryStatus.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M Source/modules/modules.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A public/platform/WebBatteryListener.h View 1 chunk +24 lines, -0 lines 0 comments Download
A public/platform/WebBatteryStatus.h View 1 1 chunk +28 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (0 generated)
Srini
Hi ojan Can you review this patch? I will be happy to rework if you ...
6 years, 9 months ago (2014-03-27 09:45:09 UTC) #1
ojan
6 years, 9 months ago (2014-03-27 17:05:01 UTC) #2
Peter Beverloo
+Tim Volodine
6 years, 8 months ago (2014-03-31 19:44:04 UTC) #3
timvolodine
Thanks for the patch Srini! I left some comments below. https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp#newcode45 ...
6 years, 8 months ago (2014-04-02 14:24:50 UTC) #4
Srini
Thx a lot Tim Volodine for your review. https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp#newcode45 Source/modules/battery/BatteryDispatcher.cpp:45: else ...
6 years, 8 months ago (2014-04-02 17:25:36 UTC) #5
timvolodine
some more comments in addition to those from yesterday. https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryManager.cpp File Source/modules/battery/BatteryManager.cpp (right): https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryManager.cpp#newcode60 Source/modules/battery/BatteryManager.cpp:60: ...
6 years, 8 months ago (2014-04-03 13:48:15 UTC) #6
Srini
On 2014/04/03 13:48:15, timvolodine wrote: > some more comments in addition to those from yesterday. ...
6 years, 8 months ago (2014-04-03 14:48:05 UTC) #7
Srini
On 2014/04/03 13:48:15, timvolodine wrote: > some more comments in addition to those from yesterday. ...
6 years, 8 months ago (2014-04-07 07:35:07 UTC) #8
timvolodine
On 2014/04/07 07:35:07, Srini wrote: > On 2014/04/03 13:48:15, timvolodine wrote: > > some more ...
6 years, 8 months ago (2014-04-07 12:34:43 UTC) #9
sof
Some feedback on the use of Oilpan transition types. https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/1/Source/modules/battery/BatteryDispatcher.cpp#newcode63 Source/modules/battery/BatteryDispatcher.cpp:63: ...
6 years, 8 months ago (2014-04-07 12:52:44 UTC) #10
Srini
On 2014/04/07 12:34:43, timvolodine wrote: > On 2014/04/07 07:35:07, Srini wrote: > > On 2014/04/03 ...
6 years, 8 months ago (2014-04-07 13:38:58 UTC) #11
Srini
On 2014/04/07 12:52:44, sof wrote: > Some feedback on the use of Oilpan transition types. ...
6 years, 8 months ago (2014-04-07 13:40:32 UTC) #12
Srini
> I see, in that case I think we can refactor the DeviceSensorEventController > class ...
6 years, 8 months ago (2014-04-08 10:56:06 UTC) #13
sof
Looks fine wrt Oilpan types; thanks.
6 years, 8 months ago (2014-04-08 11:01:21 UTC) #14
timvolodine
Thanks Srini! Looks much better, just a few more comments below. https://codereview.chromium.org/212643010/diff/20001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): ...
6 years, 8 months ago (2014-04-09 15:19:17 UTC) #15
Srini
Hi Tim, Thanks for your comments. I will incorporate them. I have a few new ...
6 years, 8 months ago (2014-04-09 16:09:56 UTC) #16
timvolodine
https://codereview.chromium.org/212643010/diff/20001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/20001/Source/modules/battery/BatteryDispatcher.cpp#newcode40 Source/modules/battery/BatteryDispatcher.cpp:40: RefPtr<BatteryStatus> status = BatteryStatus::create(batteryStatus.charging, batteryStatus.chargingTime, batteryStatus.dischargingTime, batteryStatus.level); On 2014/04/09 ...
6 years, 8 months ago (2014-04-09 18:59:01 UTC) #17
Srini
On 2014/04/09 18:59:01, timvolodine wrote: > https://codereview.chromium.org/212643010/diff/20001/Source/modules/battery/BatteryDispatcher.cpp > File Source/modules/battery/BatteryDispatcher.cpp (right): > > https://codereview.chromium.org/212643010/diff/20001/Source/modules/battery/BatteryDispatcher.cpp#newcode40 > ...
6 years, 8 months ago (2014-04-09 20:22:25 UTC) #18
Srini
> > > > yeah, I see the problem. The DeviceSensorEventController was designed to fire ...
6 years, 8 months ago (2014-04-09 20:22:52 UTC) #19
Srini
On 2014/04/09 20:22:52, Srini wrote: > > > > > > yeah, I see the ...
6 years, 8 months ago (2014-04-10 08:08:00 UTC) #20
timvolodine
On 2014/04/10 08:08:00, Srini wrote: > On 2014/04/09 20:22:52, Srini wrote: > > > > ...
6 years, 8 months ago (2014-04-10 12:14:10 UTC) #21
Srini
On 2014/04/10 12:14:10, timvolodine wrote: > On 2014/04/10 08:08:00, Srini wrote: > > On 2014/04/09 ...
6 years, 8 months ago (2014-04-14 05:34:53 UTC) #22
timvolodine
just a few questions below https://codereview.chromium.org/212643010/diff/40001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/40001/Source/modules/battery/BatteryDispatcher.cpp#newcode86 Source/modules/battery/BatteryDispatcher.cpp:86: { notImplemented(); https://codereview.chromium.org/212643010/diff/40001/Source/modules/battery/BatteryDispatcher.cpp#newcode91 Source/modules/battery/BatteryDispatcher.cpp:91: ...
6 years, 8 months ago (2014-04-14 17:51:57 UTC) #23
Srini
Just fixed those and updated the patch. Thanks! -Srini. https://codereview.chromium.org/212643010/diff/40001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/40001/Source/modules/battery/BatteryDispatcher.cpp#newcode86 Source/modules/battery/BatteryDispatcher.cpp:86: ...
6 years, 8 months ago (2014-04-14 19:53:10 UTC) #24
timvolodine
looks ok to me at least functionally ;) https://codereview.chromium.org/212643010/diff/60001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/60001/Source/modules/battery/BatteryDispatcher.cpp#newcode55 Source/modules/battery/BatteryDispatcher.cpp:55: didChangeBatteryStatus(EventTypeNames::chargingchange); ...
6 years, 8 months ago (2014-04-15 14:26:53 UTC) #25
Srini
On 2014/04/15 14:26:53, timvolodine wrote: > looks ok to me at least functionally ;) > ...
6 years, 8 months ago (2014-04-15 14:31:32 UTC) #26
timvolodine
lgtm you'll need approval from blink owners to land this.
6 years, 8 months ago (2014-04-16 17:24:06 UTC) #27
Srini
On 2014/04/16 17:24:06, timvolodine wrote: > lgtm > > > you'll need approval from blink ...
6 years, 8 months ago (2014-04-16 18:02:29 UTC) #28
Srini
On 2014/04/16 18:02:29, Srini wrote: > On 2014/04/16 17:24:06, timvolodine wrote: > > lgtm > ...
6 years, 8 months ago (2014-04-17 17:45:02 UTC) #29
adamk
I believe you'll need abarth for this one, as he's the only one of us ...
6 years, 8 months ago (2014-04-17 17:50:52 UTC) #30
abarth-chromium
lgtm https://codereview.chromium.org/212643010/diff/80001/Source/modules/battery/BatteryDispatcher.cpp File Source/modules/battery/BatteryDispatcher.cpp (right): https://codereview.chromium.org/212643010/diff/80001/Source/modules/battery/BatteryDispatcher.cpp#newcode89 Source/modules/battery/BatteryDispatcher.cpp:89: // blink::Platform::current()->setBatteryListener(this); Can you remove this commented out ...
6 years, 8 months ago (2014-04-17 23:02:15 UTC) #31
Srini
On 2014/04/17 23:02:15, abarth wrote: > lgtm > > https://codereview.chromium.org/212643010/diff/80001/Source/modules/battery/BatteryDispatcher.cpp > File Source/modules/battery/BatteryDispatcher.cpp (right): > ...
6 years, 8 months ago (2014-04-18 17:23:05 UTC) #32
Srini
On 2014/04/17 23:02:15, abarth wrote: > lgtm > > https://codereview.chromium.org/212643010/diff/80001/Source/modules/battery/BatteryDispatcher.cpp > File Source/modules/battery/BatteryDispatcher.cpp (right): > ...
6 years, 8 months ago (2014-04-21 07:11:50 UTC) #33
Srini
The CQ bit was checked by srinivasa.ragavan.venkateswaran@intel.com
6 years, 8 months ago (2014-04-21 07:13:12 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/srinivasa.ragavan.venkateswaran@intel.com/212643010/100001
6 years, 8 months ago (2014-04-21 07:13:21 UTC) #35
commit-bot: I haz the power
6 years, 8 months ago (2014-04-21 08:23:39 UTC) #36
Message was sent while issue was closed.
Change committed as 172021

Powered by Google App Engine
This is Rietveld 408576698