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

Unified Diff: mash/shell/shell_application_delegate.cc

Issue 1676713002: ash/mash: Add a mus-client that sets up ash to provide the system ui for mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mash/shell/shell_application_delegate.cc
diff --git a/mash/shell/shell_application_delegate.cc b/mash/shell/shell_application_delegate.cc
index 1cb6e27a63da5102d83932e2d21a5001a1178794..5b5a1cdb7da5f7c497978f3103c6d625b46fa9ee 100644
--- a/mash/shell/shell_application_delegate.cc
+++ b/mash/shell/shell_application_delegate.cc
@@ -5,9 +5,16 @@
#include "mash/shell/shell_application_delegate.h"
#include "base/bind.h"
+#include "base/command_line.h"
#include "mojo/shell/public/cpp/application_connection.h"
#include "mojo/shell/public/cpp/application_impl.h"
+namespace {
+
+const char kUseAshSysui[] = "use-ash-sysui";
+
+} // namespace
+
namespace mash {
namespace shell {
@@ -20,8 +27,7 @@ void ShellApplicationDelegate::Initialize(mojo::ApplicationImpl* app) {
app_ = app;
StartBrowserDriver();
StartWindowManager();
- StartWallpaper();
- StartShelf();
+ StartSystemUI();
StartQuickLaunch();
}
@@ -71,6 +77,19 @@ void ShellApplicationDelegate::StartWindowManager() {
base::Unretained(this)));
}
+void ShellApplicationDelegate::StartSystemUI() {
+ static bool use_ash =
+ base::CommandLine::ForCurrentProcess()->HasSwitch(kUseAshSysui);
+ if (use_ash) {
+ StartRestartableService("mojo:ash_sysui",
+ base::Bind(&ShellApplicationDelegate::StartSystemUI,
+ base::Unretained(this)));
+ } else {
+ StartWallpaper();
+ StartShelf();
+ }
+}
+
void ShellApplicationDelegate::StartWallpaper() {
StartRestartableService("mojo:wallpaper",
base::Bind(&ShellApplicationDelegate::StartWallpaper,

Powered by Google App Engine
This is Rietveld 408576698