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

Unified Diff: chrome/browser/ui/ash/ash_init.cc

Issue 2846893004: chromeos: makes WindowManager not delete shell when connection to mus is lost (Closed)
Patch Set: Created 3 years, 8 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 | « ash/mus/window_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/ash_init.cc
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
index e766029415e93ab7d42cae42b227a73d97e154ce..5ce632f3d27b251765965c50bfc9083612453a7f 100644
--- a/chrome/browser/ui/ash/ash_init.cc
+++ b/chrome/browser/ui/ash/ash_init.cc
@@ -67,6 +67,11 @@ std::unique_ptr<ash::mus::WindowManager> CreateMusShell() {
content::ServiceManagerConnection::GetForProcess()->GetConnector();
std::unique_ptr<ash::mus::WindowManager> window_manager =
base::MakeUnique<ash::mus::WindowManager>(connector, ash::Config::MUS);
+ // The WindowManager normally deletes the Shell when it loses its connection
+ // to mus. Disable that by installing an empty callback. Chrome installs
+ // its own callback to detect when the connection to mus is lost and that is
+ // what shuts everything down.
+ window_manager->SetLostConnectionCallback(base::BindOnce(&base::DoNothing));
std::unique_ptr<aura::WindowTreeClient> window_tree_client =
base::MakeUnique<aura::WindowTreeClient>(connector, window_manager.get(),
window_manager.get());
« no previous file with comments | « ash/mus/window_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698