diff options
author | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 19:25:51 +0000 |
---|---|---|
committer | andybons@chromium.org <andybons@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-15 19:25:51 +0000 |
commit | 113e4193e40cc13b3e94c4df76a8209485db330c (patch) | |
tree | 1afb5cda71d5164589507ce7a493b85f3583a51b /chrome/browser/browser_shutdown.cc | |
parent | bd5c9a41f61de7500b1c9065ef1f431cf9eb52ea (diff) | |
download | chromium_src-113e4193e40cc13b3e94c4df76a8209485db330c.zip chromium_src-113e4193e40cc13b3e94c4df76a8209485db330c.tar.gz chromium_src-113e4193e40cc13b3e94c4df76a8209485db330c.tar.bz2 |
Reattempt at r465143. The UI tests rely too heavily on the current behavior of closing the last window indicating exiting the entire app, so that is left alone for now with a TODO added.
From the old description:
Mac: Fixes bug where extension background hosts were being cleared when the last window was closed. It assumed that this meant the app was closing. Not the case with Mac apps. Added a mac-only notification APP_TERMINATED and use that to perform cleanup upon shutdown.
TEST=More description in the bug, but basically just make sure that background views stick around even after you've closed the last window.
BUG=28666
Review URL: http://codereview.chromium.org/502012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index 520ead7..3062dd7 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -24,6 +24,7 @@ #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/renderer_host/render_widget_host.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/chrome_plugin_lib.h" @@ -90,6 +91,11 @@ FilePath GetShutdownMsPath() { #endif void Shutdown() { +#if defined(OS_MACOSX) + NotificationService::current()->Notify(NotificationType::APP_TERMINATING, + NotificationService::AllSources(), + NotificationService::NoDetails()); +#endif // Unload plugins. This needs to happen on the IO thread. ChromeThread::PostTask( ChromeThread::IO, FROM_HERE, |