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