diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 04:32:14 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-12 04:32:14 +0000 |
commit | a93244407e205a8619d620ce91bafbdf88eab195 (patch) | |
tree | 11cb0d23c6936c0e867c15aacd8450f4bb40cce2 /chrome/browser/browser_list.cc | |
parent | 4dee39c5d979e25a0515e3f97d3657a464dd7d79 (diff) | |
download | chromium_src-a93244407e205a8619d620ce91bafbdf88eab195.zip chromium_src-a93244407e205a8619d620ce91bafbdf88eab195.tar.gz chromium_src-a93244407e205a8619d620ce91bafbdf88eab195.tar.bz2 |
SIGTERM should cause the application to exit on the Mac.
BUG=23551
TEST=Send SIGTERM to the browser process. It should exit cleanly.
Review URL: http://codereview.chromium.org/269048
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_list.cc')
-rw-r--r-- | chrome/browser/browser_list.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/chrome/browser/browser_list.cc b/chrome/browser/browser_list.cc index 24b796c..8db7b46 100644 --- a/chrome/browser/browser_list.cc +++ b/chrome/browser/browser_list.cc @@ -17,6 +17,10 @@ #include "chrome/common/notification_service.h" #include "chrome/common/result_codes.h" +#if defined(OS_MACOSX) +#include "chrome/browser/chrome_application_mac.h" +#endif + namespace { // This object is instantiated when the first Browser object is added to the @@ -186,6 +190,19 @@ void BrowserList::CloseAllBrowsers(bool use_post) { } // static +void BrowserList::CloseAllBrowsersAndExit() { +#if !defined(OS_MACOSX) + // On most platforms, closing all windows causes the application to exit. + CloseAllBrowsers(true); +#else + // On the Mac, the application continues to run once all windows are closed. + // Terminate will result in a CloseAllBrowsers(true) call, and additionally, + // will cause the application to exit cleanly. + CrApplicationCC::Terminate(); +#endif +} + +// static void BrowserList::WindowsSessionEnding() { // EndSession is invoked once per frame. Only do something the first time. static bool already_ended = false; |