Index: mash/example/window_type_launcher/window_type_launcher.cc |
diff --git a/mash/example/window_type_launcher/window_type_launcher.cc b/mash/example/window_type_launcher/window_type_launcher.cc |
index b46939578463411c158ff6472d57d026deae5c22..1d56a8728b0435d9eff7d1fa6938d8653c4427c1 100644 |
--- a/mash/example/window_type_launcher/window_type_launcher.cc |
+++ b/mash/example/window_type_launcher/window_type_launcher.cc |
@@ -5,8 +5,8 @@ |
#include "mash/example/window_type_launcher/window_type_launcher.h" |
#include "base/macros.h" |
+#include "base/message_loop/message_loop.h" |
#include "base/strings/utf_string_conversions.h" |
-#include "mash/login/public/interfaces/login.mojom.h" |
#include "mash/shell/public/interfaces/shell.mojom.h" |
#include "mojo/converters/geometry/geometry_type_converters.h" |
#include "mojo/shell/public/cpp/connection.h" |
@@ -283,13 +283,13 @@ class WindowTypeLauncherView : public views::WidgetDelegateView, |
connector_->ConnectToInterface("mojo:mash_shell", &shell); |
shell->LockScreen(); |
} else if (sender == logout_button_) { |
- mash::login::mojom::LoginPtr login; |
- connector_->ConnectToInterface("mojo:login", &login); |
- login->Logout(); |
+ mash::shell::mojom::ShellPtr shell; |
+ connector_->ConnectToInterface("mojo:mash_shell", &shell); |
+ shell->Logout(); |
} else if (sender == switch_user_button_) { |
- mash::login::mojom::LoginPtr login; |
- connector_->ConnectToInterface("mojo:login", &login); |
- login->SwitchUser(); |
+ mash::shell::mojom::ShellPtr shell; |
+ connector_->ConnectToInterface("mojo:mash_shell", &shell); |
+ shell->SwitchUser(); |
} else if (sender == widgets_button_) { |
NOTIMPLEMENTED(); |
} |
@@ -383,3 +383,7 @@ void WindowTypeLauncher::Initialize(mojo::Connector* connector, |
widget->Init(params); |
widget->Show(); |
} |
+ |
+void WindowTypeLauncher::ShellConnectionLost() { |
+ base::MessageLoop::current()->QuitWhenIdle(); |
+} |