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, |