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)) { |