| 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 #include "chrome/browser/ui/host_desktop.h" |
| 9 |
| 8 namespace browser { | 10 namespace browser { |
| 9 | 11 |
| 10 // Starts a user initiated exit process. Called from Browser::Exit. | 12 // Starts a user initiated exit process. Called from Browser::Exit. |
| 11 // On platforms other than ChromeOS, this is equivalent to | 13 // On platforms other than ChromeOS, this is equivalent to |
| 12 // CloseAllBrowsers() On ChromeOS, this tells session manager | 14 // CloseAllBrowsers() On ChromeOS, this tells session manager |
| 13 // that chrome is signing out, which lets session manager send | 15 // that chrome is signing out, which lets session manager send |
| 14 // SIGTERM to start actual exit process. | 16 // SIGTERM to start actual exit process. |
| 15 void AttemptUserExit(); | 17 void AttemptUserExit(); |
| 16 | 18 |
| 17 // Starts a user initiated restart process. On platforms other than | 19 // Starts a user initiated restart process. On platforms other than |
| (...skipping 26 matching lines...) Expand all Loading... |
| 44 // handle SIGTERM on chromeos which is a signal to force shutdown | 46 // handle SIGTERM on chromeos which is a signal to force shutdown |
| 45 // the chrome. | 47 // the chrome. |
| 46 void ExitCleanly(); | 48 void ExitCleanly(); |
| 47 #endif | 49 #endif |
| 48 | 50 |
| 49 // Closes all browsers. If the session is ending the windows are closed | 51 // Closes all browsers. If the session is ending the windows are closed |
| 50 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE | 52 // directly. Otherwise the windows are closed by way of posting a WM_CLOSE |
| 51 // message. | 53 // message. |
| 52 void CloseAllBrowsers(); | 54 void CloseAllBrowsers(); |
| 53 | 55 |
| 56 // Closes all browsers of the type (Desktop/Ash) passed in. |
| 57 void CloseAllBrowsersOfType(chrome::HostDesktopType type); |
| 58 |
| 54 // Begins shutdown of the application when the desktop session is ending. | 59 // Begins shutdown of the application when the desktop session is ending. |
| 55 void SessionEnding(); | 60 void SessionEnding(); |
| 56 | 61 |
| 57 // Tells the BrowserList to keep the application alive after the last Browser | 62 // Tells the BrowserList to keep the application alive after the last Browser |
| 58 // closes. This is implemented as a count, so callers should pair their calls | 63 // closes. This is implemented as a count, so callers should pair their calls |
| 59 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no | 64 // to StartKeepAlive() with matching calls to EndKeepAlive() when they no |
| 60 // longer need to keep the application running. | 65 // longer need to keep the application running. |
| 61 void StartKeepAlive(); | 66 void StartKeepAlive(); |
| 62 | 67 |
| 63 // Stops keeping the application alive after the last Browser is closed. | 68 // Stops keeping the application alive after the last Browser is closed. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 79 // Called once the application is exiting. | 84 // Called once the application is exiting. |
| 80 void OnAppExiting(); | 85 void OnAppExiting(); |
| 81 | 86 |
| 82 // Called once the application is exiting to do any platform specific | 87 // Called once the application is exiting to do any platform specific |
| 83 // processing required. | 88 // processing required. |
| 84 void HandleAppExitingForPlatform(); | 89 void HandleAppExitingForPlatform(); |
| 85 | 90 |
| 86 } // namespace browser | 91 } // namespace browser |
| 87 | 92 |
| 88 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 93 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
| OLD | NEW |