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

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: fix-cros-build 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
« no previous file with comments | « mash/shell/shell_application_delegate.h ('k') | ui/base/user_activity/user_activity_detector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/shell/shell_application_delegate.cc
diff --git a/mash/shell/shell_application_delegate.cc b/mash/shell/shell_application_delegate.cc
index a88c6d6372f5992001d81b3154dbcc5ed947f837..042eeadb0a634c06b91493d00238a4bf9799ca3c 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/connection.h"
#include "mojo/shell/public/cpp/shell.h"
+namespace {
+
+const char kUseAshSysui[] = "use-ash-sysui";
+
+} // namespace
+
namespace mash {
namespace shell {
@@ -22,8 +29,7 @@ void ShellApplicationDelegate::Initialize(mojo::Shell* shell,
shell_ = shell;
StartBrowserDriver();
StartWindowManager();
- StartWallpaper();
- StartShelf();
+ StartSystemUI();
StartQuickLaunch();
}
@@ -72,6 +78,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,
« no previous file with comments | « mash/shell/shell_application_delegate.h ('k') | ui/base/user_activity/user_activity_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698