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

Unified Diff: mash/example/window_type_launcher/window_type_launcher.cc

Issue 1810713002: Cascade shutdown of instances (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@55all_users
Patch Set: . Created 4 years, 9 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/example/window_type_launcher/window_type_launcher.h ('k') | mash/init/init.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+}
« no previous file with comments | « mash/example/window_type_launcher/window_type_launcher.h ('k') | mash/init/init.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698