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; |
| 9 |
8 namespace chrome { | 10 namespace chrome { |
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // For ChromeOS, also request session manager to end the session. | 78 // For ChromeOS, also request session manager to end the session. |
77 void NotifyAndTerminate(bool fast_path); | 79 void NotifyAndTerminate(bool fast_path); |
78 | 80 |
79 // Called once the application is exiting. | 81 // Called once the application is exiting. |
80 void OnAppExiting(); | 82 void OnAppExiting(); |
81 | 83 |
82 // Called once the application is exiting to do any platform specific | 84 // Called once the application is exiting to do any platform specific |
83 // processing required. | 85 // processing required. |
84 void HandleAppExitingForPlatform(); | 86 void HandleAppExitingForPlatform(); |
85 | 87 |
| 88 // Returns true if we can start the shutdown sequence for the browser, i.e. the |
| 89 // last browser window is being closed. |
| 90 bool ShouldStartShutdown(Browser* browser); |
| 91 |
86 } // namespace chrome | 92 } // namespace chrome |
87 | 93 |
88 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 94 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
OLD | NEW |