Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_LIFETIME_APPLICATION_LIFETIME_H_ | 5 #ifndef CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
| 6 #define CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 6 #define CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
| 7 | 7 |
| 8 class Browser; | 8 class Browser; |
| 9 | 9 |
| 10 namespace chrome { | 10 namespace chrome { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
| 48 // This is equivalent to AttemptUserExit, except that it always set | 48 // This is equivalent to AttemptUserExit, except that it always set |
| 49 // exit cleanly bit. ChromeOS checks if it can exit without user | 49 // exit cleanly bit. ChromeOS checks if it can exit without user |
| 50 // interactions, so it will always exit the browser. This is used to | 50 // interactions, so it will always exit the browser. This is used to |
| 51 // handle SIGTERM on chromeos which is a signal to force shutdown | 51 // handle SIGTERM on chromeos which is a signal to force shutdown |
| 52 // the chrome. | 52 // the chrome. |
| 53 void ExitCleanly(); | 53 void ExitCleanly(); |
| 54 #endif | 54 #endif |
| 55 | 55 |
| 56 // Closes all browsers and if successful, quits. | |
| 57 void CloseAllBrowsersAndQuit(); | |
| 58 | |
| 56 // Closes all browsers. If the session is ending the windows are closed | 59 // Closes all browsers. If the session is ending the windows are closed |
| 57 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE | 60 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE |
| 58 // message. | 61 // message. |
| 59 void CloseAllBrowsers(); | 62 void CloseAllBrowsers(); |
|
benwells
2013/10/20 23:46:22
Update the comment to mention under what circumsta
Sam McNally
2013/10/21 04:31:03
Done.
| |
| 60 | 63 |
| 61 // Begins shutdown of the application when the desktop session is ending. | 64 // Begins shutdown of the application when the desktop session is ending. |
| 62 void SessionEnding(); | 65 void SessionEnding(); |
| 63 | 66 |
| 64 // Tells the BrowserList to keep the application alive after the last Browser | 67 // Tells the BrowserList to keep the application alive after the last Browser |
| 65 // closes. This is implemented as a count, so callers should pair their calls | 68 // closes. This is implemented as a count, so callers should pair their calls |
| 66 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no | 69 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no |
| 67 // longer need to keep the application running. | 70 // longer need to keep the application running. |
| 68 void StartKeepAlive(); | 71 void StartKeepAlive(); |
| 69 | 72 |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 90 // processing required. | 93 // processing required. |
| 91 void HandleAppExitingForPlatform(); | 94 void HandleAppExitingForPlatform(); |
| 92 | 95 |
| 93 // Returns true if we can start the shutdown sequence for the browser, i.e. the | 96 // Returns true if we can start the shutdown sequence for the browser, i.e. the |
| 94 // last browser window is being closed. | 97 // last browser window is being closed. |
| 95 bool ShouldStartShutdown(Browser* browser); | 98 bool ShouldStartShutdown(Browser* browser); |
| 96 | 99 |
| 97 } // namespace chrome | 100 } // namespace chrome |
| 98 | 101 |
| 99 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 102 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
| OLD | NEW |