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

Unified Diff: chrome/browser/browser_shutdown.h

Issue 1520006: Mac: reform our shutdown routine. (Closed)
Patch Set: changed comment Created 10 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
« no previous file with comments | « chrome/browser/browser_list_mac.mm ('k') | chrome/browser/browser_shutdown.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_shutdown.h
diff --git a/chrome/browser/browser_shutdown.h b/chrome/browser/browser_shutdown.h
index 49d800f8670d1c410f8ecece204dc33ad5fa38cf..3ab2c2eec3af0cbb88ae995b055065143af62479 100644
--- a/chrome/browser/browser_shutdown.h
+++ b/chrome/browser/browser_shutdown.h
@@ -44,6 +44,22 @@ void Shutdown();
// Called at startup to create a histogram from our previous shutdown time.
void ReadLastShutdownInfo();
+#if defined(OS_MACOSX)
+// On Mac, closing the last window does not automatically quit the application.
+// To actually quit, set a flag which makes final window closure trigger a quit.
+// If the quit is aborted, then the flag should be reset (but see notes below on
+// the proper way to do this, i.e., usually not using |SetTryingToQuit()|).
+
+// This is a low-level mutator; in general, don't call it, except from
+// appropriate places in the app controller. To quit, use usual means, e.g.,
+// using |chrome_browser_application_mac::Terminate()|. To stop quitting, use
+// |chrome_browser_application_mac::CancelTerminate()|.
+void SetTryingToQuit(bool quitting);
+
+// General accessor.
+bool IsTryingToQuit();
+#endif // OS_MACOSX
+
} // namespace browser_shutdown
#endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__
« no previous file with comments | « chrome/browser/browser_list_mac.mm ('k') | chrome/browser/browser_shutdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698