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

Issue 2381753002: Use mojo SystemTray interfaces for both mash and classic ash (Closed)

Created:
4 years, 2 months ago by James Cook
Modified:
4 years, 2 months ago
CC:
chromium-reviews, kalyank, sadrul, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use mojo SystemTray interfaces for both mash and classic ash The goal is to stop having to maintain separate SystemTrayDelegateMus and SystemTrayDelegateChromeos implementations and eliminate the indirection introduced by SystemTrayCommon. * Always create the SystemTrayClient object in chrome, whether running ash in-process or not * Always allow code in //ash to bind to mojom::SystemTrayClient, even when ash runs in-process * Introduce WmShell::IsRunningInMash so ash can tell which mode its in * Handle connecting to "exe:chrome" vs. "exe:content_browser" based on the process mode * Introduces SystemTrayController in ash, which wraps mojom::SystemTrayClient * Peel two methods off the SystemTrayDelegate interface and changes them to call into SystemTrayController and route over mojo * Remove mojo usage from SystemTrayDelegateMus. Eventually it should go away completely. To keep this CL small it breaks a few system tray features when running under mash (e.g. opening the general settings). This will get fixed in the next CL. TODO: Remove SystemTrayCommon and move its functionality into SystemTrayClient TODO: For methods like SystemTrayDelegate::ShowSettings, migrate callers to use ash::SystemTrayController and always route over mojo. BUG=647412 TEST=manual, clicking on system tray date opens date settings, changing time from 12 to 24 hour works, in both classic ash and mash Committed: https://crrev.com/2a6b869d3921b816777679003d1df24f6c7b84fa Cr-Commit-Position: refs/heads/master@{#422676}

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 5

Patch Set 3 : it works, but needs cleanup #

Patch Set 4 : Restructure based on feedback #

Total comments: 56

Patch Set 5 : review comments #

Total comments: 3

Patch Set 6 : mojo_interface_factory namespace, fix browser test #

Patch Set 7 : rebase, add security OWNERS for chrome/app/mojo #

Patch Set 8 : fix manifest after rebase, paired with rockot #

Patch Set 9 : rebase again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+350 lines, -274 lines) Patch
M ash/BUILD.gn View 1 2 3 4 chunks +6 lines, -0 lines 0 comments Download
M ash/DEPS View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ash/aura/wm_shell_aura.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ash/aura/wm_shell_aura.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
A ash/common/mojo_interface_factory.h View 1 2 3 4 5 1 chunk +35 lines, -0 lines 0 comments Download
A ash/common/mojo_interface_factory.cc View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
M ash/common/shell_delegate.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M ash/common/system/date/date_view.cc View 1 2 3 4 5 chunks +5 lines, -4 lines 0 comments Download
M ash/common/system/tray/system_tray.cc View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
A ash/common/system/tray/system_tray_controller.h View 1 2 3 4 1 chunk +72 lines, -0 lines 0 comments Download
A ash/common/system/tray/system_tray_controller.cc View 1 2 3 4 1 chunk +65 lines, -0 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.h View 1 1 chunk +0 lines, -6 lines 0 comments Download
M ash/common/system/tray/system_tray_delegate.cc View 1 1 chunk +0 lines, -6 lines 0 comments Download
M ash/common/wm_shell.h View 1 2 3 4 5 chunks +13 lines, -0 lines 0 comments Download
M ash/common/wm_shell.cc View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M ash/mus/bridge/wm_shell_mus.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ash/mus/bridge/wm_shell_mus.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ash/mus/shell_delegate_mus.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ash/mus/shell_delegate_mus.cc View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M ash/mus/system_tray_delegate_mus.h View 1 2 3 4 1 chunk +4 lines, -49 lines 0 comments Download
M ash/mus/system_tray_delegate_mus.cc View 1 2 3 4 3 chunks +3 lines, -120 lines 0 comments Download
M ash/mus/window_manager_application.h View 1 2 3 4 chunks +0 lines, -7 lines 0 comments Download
M ash/mus/window_manager_application.cc View 1 2 3 4 5 4 chunks +5 lines, -13 lines 0 comments Download
M ash/shell/shell_delegate_impl.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M ash/shell/shell_delegate_impl.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M ash/test/test_shell_delegate.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M ash/test/test_shell_delegate.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A + chrome/app/mojo/OWNERS View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M chrome/app/mojo/chrome_manifest.json View 1 2 3 1 chunk +8 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -4 lines 0 comments Download
M chrome/browser/chrome_content_browser_manifest_overlay.json View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_interface_factory.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/chromeos/chrome_interface_factory.cc View 1 2 3 4 5 3 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/device_system_use_24hour_clock_browsertest.cc View 1 2 3 4 8 chunks +13 lines, -11 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_client.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_client.cc View 1 2 3 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_common.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.h View 1 2 3 4 6 chunks +0 lines, -14 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos.cc View 1 2 3 4 6 chunks +0 lines, -27 lines 0 comments Download
M chrome/browser/ui/ash/system_tray_delegate_chromeos_browsertest_chromeos.cc View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc View 1 2 1 chunk +4 lines, -7 lines 0 comments Download
M content/public/app/mojo/content_browser_manifest.json View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 41 (26 generated)
James Cook
sky/msw - this is not for formal review, but I'd appreciate it if you could ...
4 years, 2 months ago (2016-09-29 00:53:31 UTC) #2
sky
I like it! Here are a couple of comments. https://codereview.chromium.org/2381753002/diff/20001/ash/common/system/tray/system_tray_controller.cc File ash/common/system/tray/system_tray_controller.cc (right): https://codereview.chromium.org/2381753002/diff/20001/ash/common/system/tray/system_tray_controller.cc#newcode17 ash/common/system/tray/system_tray_controller.cc:17: ...
4 years, 2 months ago (2016-09-29 16:34:05 UTC) #3
James Cook
https://codereview.chromium.org/2381753002/diff/20001/ash/common/system/tray/system_tray_controller.cc File ash/common/system/tray/system_tray_controller.cc (right): https://codereview.chromium.org/2381753002/diff/20001/ash/common/system/tray/system_tray_controller.cc#newcode47 ash/common/system/tray/system_tray_controller.cc:47: connector_->ConnectToInterface("exe:chrome", &system_tray_client_); On 2016/09/29 16:34:05, sky wrote: > The ...
4 years, 2 months ago (2016-09-29 16:43:33 UTC) #4
James Cook
msw, please take a look, especially at the SystemTrayDelegate / SystemTrayController / SystemTrayClient pieces and ...
4 years, 2 months ago (2016-09-30 21:18:27 UTC) #12
msw
Brilliant! I really like this pattern. Mostly minor nits. https://codereview.chromium.org/2381753002/diff/60001/ash/common/mojo_interface_factory.h File ash/common/mojo_interface_factory.h (right): https://codereview.chromium.org/2381753002/diff/60001/ash/common/mojo_interface_factory.h#newcode22 ash/common/mojo_interface_factory.h:22: ...
4 years, 2 months ago (2016-09-30 23:26:50 UTC) #15
James Cook
rockot, ping? msw, please take another look. https://codereview.chromium.org/2381753002/diff/60001/ash/common/system/tray/system_tray_controller.cc File ash/common/system/tray/system_tray_controller.cc (right): https://codereview.chromium.org/2381753002/diff/60001/ash/common/system/tray/system_tray_controller.cc#newcode11 ash/common/system/tray/system_tray_controller.cc:11: #include "base/i18n/time_formatting.h" ...
4 years, 2 months ago (2016-10-03 18:07:56 UTC) #17
Ken Rockot(use gerrit already)
Manifests, browser client code, MojoInterfaceFactory, and (rough review of everything else) all LGTM https://codereview.chromium.org/2381753002/diff/80001/ash/common/mojo_interface_factory.h File ...
4 years, 2 months ago (2016-10-03 18:19:03 UTC) #19
msw
lgtm https://codereview.chromium.org/2381753002/diff/60001/chrome/app/mojo/chrome_manifest.json File chrome/app/mojo/chrome_manifest.json (right): https://codereview.chromium.org/2381753002/diff/60001/chrome/app/mojo/chrome_manifest.json#newcode23 chrome/app/mojo/chrome_manifest.json:23: "ash": [ On 2016/10/03 18:07:56, James Cook wrote: ...
4 years, 2 months ago (2016-10-03 19:04:43 UTC) #20
James Cook
tsepez, can I get security review for the *manifest.json files? (And should //chrome/app/mojo have an ...
4 years, 2 months ago (2016-10-03 20:15:00 UTC) #24
Tom Sepez
JSON lgtm; would you be kind enough to add the OWNERS file?
4 years, 2 months ago (2016-10-03 21:48:48 UTC) #27
James Cook
sky, can I get an OWNERS stamp for chrome/app/mojo/OWNERS and c/b/chrome_content_browser_client.cc ?
4 years, 2 months ago (2016-10-03 23:09:37 UTC) #31
sky
LGTM
4 years, 2 months ago (2016-10-03 23:29:01 UTC) #34
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/2381753002/160001
4 years, 2 months ago (2016-10-03 23:42:53 UTC) #37
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 2 months ago (2016-10-04 02:41:52 UTC) #39
commit-bot: I haz the power
4 years, 2 months ago (2016-10-04 02:45:01 UTC) #41
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/2a6b869d3921b816777679003d1df24f6c7b84fa
Cr-Commit-Position: refs/heads/master@{#422676}

Powered by Google App Engine
This is Rietveld 408576698