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

Unified Diff: chrome/browser/browser_list.cc

Issue 269048: SIGTERM should cause the application to exit on the Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « chrome/browser/browser_list.h ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_list.cc
===================================================================
--- chrome/browser/browser_list.cc (revision 28692)
+++ chrome/browser/browser_list.cc (working copy)
@@ -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 @@
}
// 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;
« no previous file with comments | « chrome/browser/browser_list.h ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698