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
Review-Url: https://codereview.chromium.org/2381753002
Cr-Commit-Position: refs/heads/master@{#422676}
diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h
index 7acf6f7..651bbaa4 100644
--- a/ash/shell/shell_delegate_impl.h
+++ b/ash/shell/shell_delegate_impl.h
@@ -28,6 +28,8 @@
ShellDelegateImpl();
~ShellDelegateImpl() override;
+ // ShellDelegate:
+ ::shell::Connector* GetShellConnector() const override;
bool IsFirstRunAfterBoot() const override;
bool IsIncognitoAllowed() const override;
bool IsMultiProfilesEnabled() const override;