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

Unified Diff: chrome/browser/ui/browser_list_aura.cc

Issue 9968101: Close notification windows while message loop is still active (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 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
Index: chrome/browser/ui/browser_list_aura.cc
diff --git a/chrome/browser/ui/browser_list_aura.cc b/chrome/browser/ui/browser_list_aura.cc
index fd07304606996853208683e2389a217505740d59..7bd45e7aae5d6295372035fca625ef95a98c9057 100644
--- a/chrome/browser/ui/browser_list_aura.cc
+++ b/chrome/browser/ui/browser_list_aura.cc
@@ -6,9 +6,25 @@
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/browser/browser_process.h"
+#include "chrome/browser/notifications/notification_ui_manager.h"
+
+#if defined(USE_ASH)
+#include "ash/shell.h"
+#endif
// static
void BrowserList::HandleAppExitingForPlatform() {
+ // Close All non browser windows now. Those includes notifications
+ // and windows created by Ash (launcher, background, etc).
+ g_browser_process->notification_ui_manager()->CancelAll();
+#if defined(USE_ASH)
+ // Shutdown the shell while the message loop is still alive.
+ // Don't delete ash shell instance yet because someone may try to
+ // access the shell, which will create new instance. We rather
+ // want to let it die if that happens.
+ ash::Shell::GetInstance()->Shutdown();
Ben Goodger (Google) 2012/04/10 22:35:02 can you delete the instance and then set shutdown_
oshima 2012/04/10 23:06:55 Looks like GetInstance no longer creates instance.
+#endif
#if defined(OS_CHROMEOS)
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableZeroBrowsersOpenForTests)) {

Powered by Google App Engine
This is Rietveld 408576698