OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H__ | 5 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H__ |
6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H__ | 6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H__ |
7 | 7 |
8 class PrefService; | 8 class PrefService; |
9 | 9 |
10 namespace browser_shutdown { | 10 namespace browser_shutdown { |
(...skipping 26 matching lines...) Expand all Loading... |
37 // . When the last browser has been deleted and the message loop has finished | 37 // . When the last browser has been deleted and the message loop has finished |
38 // running. | 38 // running. |
39 // . When ChromeFrame::EndSession is invoked and we need to do cleanup. | 39 // . When ChromeFrame::EndSession is invoked and we need to do cleanup. |
40 // NOTE: in this case the message loop is still running, but will die soon | 40 // NOTE: in this case the message loop is still running, but will die soon |
41 // after this returns. | 41 // after this returns. |
42 void Shutdown(); | 42 void Shutdown(); |
43 | 43 |
44 // Called at startup to create a histogram from our previous shutdown time. | 44 // Called at startup to create a histogram from our previous shutdown time. |
45 void ReadLastShutdownInfo(); | 45 void ReadLastShutdownInfo(); |
46 | 46 |
| 47 #if defined(OS_MACOSX) |
| 48 // On Mac, closing the last window does not automatically quit the application. |
| 49 // To actually quit, set a flag which makes final window closure trigger a quit. |
| 50 // If the quit is aborted, then the flag should be reset (but see notes below on |
| 51 // the proper way to do this, i.e., usually not using |SetTryingToQuit()|). |
| 52 |
| 53 // This is a low-level mutator; in general, don't call it, except from |
| 54 // appropriate places in the app controller. To quit, use usual means, e.g., |
| 55 // using |chrome_browser_application_mac::Terminate()|. To stop quitting, use |
| 56 // |chrome_browser_application_mac::CancelTerminate()|. |
| 57 void SetTryingToQuit(bool quitting); |
| 58 |
| 59 // General accessor. |
| 60 bool IsTryingToQuit(); |
| 61 #endif // OS_MACOSX |
| 62 |
47 } // namespace browser_shutdown | 63 } // namespace browser_shutdown |
48 | 64 |
49 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ | 65 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ |
OLD | NEW |