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

Issue 2433203003: Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process (Closed)

Created:
4 years, 2 months ago by ke.he
Modified:
4 years, 1 month ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process Mojoify PoweMonitorMessageBroadcaster is the first step of "Decoupling Power Monitor from //Content". PowerMonitorMessageBroadcaster sends messages to both RenderProcess and other ChildProcess. This CL Mojoifies the messages PowerMonitorMsg_PowerStateChange, PowerMonitorMsg_Suspend, and PowerMonitorMsg_Resume. To do so we introduce the PowerMonitorClient Mojo interface and change the PowerMonitorBroadcastSource to implement the interface. To avoid configure PowerMonitorClientPtr separately in {child,render}_process_ host_impl.cc, we add the PowerMonitor mojo interface, and add the BrowserChildProcessHost::ConnectionFilterImpl so it can register the mojo interface implementation in BrowserChildProcessHostImpl side. Unit tests for PowerMonitorMessageBroadcaster and PowerMonitorBroadcastSource are changed accordingly. Followup will decouple PowerMonitorMessageBroadcaster and PowerMonitorBroadcastSource from //Content. BUG=647247 Committed: https://crrev.com/19b5e6a89dcadde523d674878434e7948f387e0d Cr-Commit-Position: refs/heads/master@{#427965}

Patch Set 1 #

Patch Set 2 : Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process #

Total comments: 4

Patch Set 3 : Add connectfilter in BrowserChildProcessHost. #

Patch Set 4 : Mojoify PoweMonitorMessageBroadcaster IPC from browser to child process #

Patch Set 5 : code rebase #

Total comments: 11

Patch Set 6 : Modify AddClient, Connectionfilter innerClass #

Patch Set 7 : code rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -212 lines) Patch
M AUTHORS View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/browser_child_process_host_impl.h View 1 2 3 4 5 1 chunk +0 lines, -2 lines 0 comments Download
M content/browser/browser_child_process_host_impl.cc View 1 2 3 4 5 6 6 chunks +26 lines, -3 lines 0 comments Download
M content/browser/power_monitor_message_broadcaster.h View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download
M content/browser/power_monitor_message_broadcaster.cc View 1 2 3 4 5 3 chunks +21 lines, -9 lines 0 comments Download
M content/browser/power_monitor_message_broadcaster_unittest.cc View 1 2 3 4 5 3 chunks +32 lines, -37 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 4 chunks +4 lines, -3 lines 0 comments Download
M content/child/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M content/child/child_thread_impl.cc View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M content/child/power_monitor_broadcast_source.h View 1 2 3 1 chunk +9 lines, -18 lines 0 comments Download
M content/child/power_monitor_broadcast_source.cc View 1 2 3 4 5 1 chunk +14 lines, -76 lines 0 comments Download
M content/child/power_monitor_broadcast_source_unittest.cc View 2 chunks +9 lines, -18 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 2 chunks +1 line, -1 line 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
D content/common/power_monitor_messages.h View 1 chunk +0 lines, -26 lines 0 comments Download
M content/public/app/mojo/content_browser_manifest.json View 1 2 3 4 2 chunks +7 lines, -2 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A + device/power_monitor/public/interfaces/BUILD.gn View 1 chunk +1 line, -1 line 0 comments Download
A + device/power_monitor/public/interfaces/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A device/power_monitor/public/interfaces/power_monitor.mojom View 1 2 3 4 5 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 74 (44 generated)
leonhsl(Using Gerrit)
Hi, blundell@, ke.he@intel.com is my teammate who is also interested in chromium mojo related development ...
4 years, 2 months ago (2016-10-20 13:36:01 UTC) #10
blundell
A good start! I just commented on the highest-level issues, will do a nitty-gritty review ...
4 years, 2 months ago (2016-10-20 22:42:22 UTC) #12
ke.he
https://codereview.chromium.org/2433203003/diff/20001/content/browser/power_monitor_message_broadcaster.h File content/browser/power_monitor_message_broadcaster.h (right): https://codereview.chromium.org/2433203003/diff/20001/content/browser/power_monitor_message_broadcaster.h#newcode28 content/browser/power_monitor_message_broadcaster.h:28: void Init(device::mojom::PowerMonitorClientPtr& power_monitor_client); On 2016/10/20 22:42:22, blundell wrote: > ...
4 years, 2 months ago (2016-10-24 06:54:39 UTC) #13
ke.he
my git operation mistake caused a new cl at https://codereview.chromium.org/2447613004/ after Patch Set 2 of ...
4 years, 1 month ago (2016-10-24 11:32:02 UTC) #14
ke.he
Use "git cl issue" resolved the my git operation mistake, so still keep the code ...
4 years, 1 month ago (2016-10-25 14:14:07 UTC) #28
ke.he
Use "git cl issue" resolved the my git operation mistake, so still keep the code ...
4 years, 1 month ago (2016-10-25 14:14:11 UTC) #29
Ken Rockot(use gerrit already)
This is great. LGTM! https://codereview.chromium.org/2433203003/diff/80001/device/power_monitor/public/interfaces/power_monitor.mojom File device/power_monitor/public/interfaces/power_monitor.mojom (right): https://codereview.chromium.org/2433203003/diff/80001/device/power_monitor/public/interfaces/power_monitor.mojom#newcode9 device/power_monitor/public/interfaces/power_monitor.mojom:9: AddClient(PowerMonitorClient client); nit: I think ...
4 years, 1 month ago (2016-10-25 16:53:13 UTC) #30
blundell
Nice! Ken, could you review whether the setup in browser_child_process_host.cc looks good and also the ...
4 years, 1 month ago (2016-10-25 16:53:44 UTC) #31
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.cc File content/child/power_monitor_broadcast_source.cc (right): https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.cc#newcode22 content/child/power_monitor_broadcast_source.cc:22: power_monitor->AddClient(binding_.CreateInterfacePtrAndBind()); On 2016/10/25 at 16:53:44, blundell wrote: > There's ...
4 years, 1 month ago (2016-10-25 16:56:14 UTC) #32
blundell
On 2016/10/25 16:56:14, Ken Rockot wrote: > https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.cc > File content/child/power_monitor_broadcast_source.cc (right): > > https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.cc#newcode22 ...
4 years, 1 month ago (2016-10-25 16:58:14 UTC) #33
blundell
Did you sign the CLA? https://cla.developers.google.com/about/google-individual?csw=1
4 years, 1 month ago (2016-10-25 17:00:36 UTC) #34
ke.he
On 2016/10/25 17:00:36, blundell wrote: > Did you sign the CLA? > > https://cla.developers.google.com/about/google-individual?csw=1 Yes, ...
4 years, 1 month ago (2016-10-26 05:22:31 UTC) #35
ke.he
https://codereview.chromium.org/2433203003/diff/80001/content/browser/browser_child_process_host_impl.h File content/browser/browser_child_process_host_impl.h (right): https://codereview.chromium.org/2433203003/diff/80001/content/browser/browser_child_process_host_impl.h#newcode123 content/browser/browser_child_process_host_impl.h:123: class ConnectionFilterImpl; On 2016/10/25 16:53:44, blundell wrote: > nit: ...
4 years, 1 month ago (2016-10-26 10:01:51 UTC) #40
leonhsl(Using Gerrit)
+jam@ : For overall OWNER review +tsepez@ : For security review Thanks!
4 years, 1 month ago (2016-10-26 10:10:50 UTC) #42
Tom Sepez
mojom LGTM
4 years, 1 month ago (2016-10-26 15:57:21 UTC) #43
jam
lgtm
4 years, 1 month ago (2016-10-26 16:14:27 UTC) #44
blundell
still lgtm https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.h File content/child/power_monitor_broadcast_source.h (right): https://codereview.chromium.org/2433203003/diff/80001/content/child/power_monitor_broadcast_source.h#newcode32 content/child/power_monitor_broadcast_source.h:32: mojo::Binding<device::mojom::PowerMonitorClient> binding_; On 2016/10/26 10:01:51, ke.he wrote: ...
4 years, 1 month ago (2016-10-26 16:18:02 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/100001
4 years, 1 month ago (2016-10-27 02:43:10 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/290626)
4 years, 1 month ago (2016-10-27 02:51:52 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/120001
4 years, 1 month ago (2016-10-27 03:04:11 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/56461)
4 years, 1 month ago (2016-10-27 04:22:20 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/120001
4 years, 1 month ago (2016-10-27 05:01:15 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/56530)
4 years, 1 month ago (2016-10-27 06:21:54 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/120001
4 years, 1 month ago (2016-10-27 06:26:42 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/251385)
4 years, 1 month ago (2016-10-27 07:02:45 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/120001
4 years, 1 month ago (2016-10-27 07:30:57 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/303868)
4 years, 1 month ago (2016-10-27 07:56:27 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433203003/120001
4 years, 1 month ago (2016-10-27 08:10:42 UTC) #71
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 1 month ago (2016-10-27 08:47:31 UTC) #72
commit-bot: I haz the power
4 years, 1 month ago (2016-10-27 08:51:04 UTC) #74
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/19b5e6a89dcadde523d674878434e7948f387e0d
Cr-Commit-Position: refs/heads/master@{#427965}

Powered by Google App Engine
This is Rietveld 408576698