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 { |
11 | 11 |
12 // Starts a user initiated exit process. Called from Browser::Exit. | 12 // Starts a user initiated exit process. Called from Browser::Exit. |
13 // On platforms other than ChromeOS, this is equivalent to | 13 // On platforms other than ChromeOS, this is equivalent to |
14 // CloseAllBrowsers() On ChromeOS, this tells session manager | 14 // CloseAllBrowsers() On ChromeOS, this tells session manager |
15 // that chrome is signing out, which lets session manager send | 15 // that chrome is signing out, which lets session manager send |
16 // SIGTERM to start actual exit process. | 16 // SIGTERM to start actual exit process. |
17 void AttemptUserExit(); | 17 void AttemptUserExit(); |
18 | 18 |
| 19 // Starts to collect shutdown traces. On ChromeOS this will start immediately |
| 20 // on AttemptUserExit() and all other systems will start once all tabs are |
| 21 // closed. |
| 22 void StartShutdownTracing(); |
| 23 |
19 // Starts a user initiated restart process. On platforms other than | 24 // Starts a user initiated restart process. On platforms other than |
20 // chromeos, this sets a restart bit in the preference so that | 25 // chromeos, this sets a restart bit in the preference so that |
21 // chrome will be restarted at the end of shutdown process. On | 26 // chrome will be restarted at the end of shutdown process. On |
22 // ChromeOS, this simply exits the chrome, which lets sesssion | 27 // ChromeOS, this simply exits the chrome, which lets sesssion |
23 // manager re-launch the browser with restore last session flag. | 28 // manager re-launch the browser with restore last session flag. |
24 void AttemptRestart(); | 29 void AttemptRestart(); |
25 | 30 |
26 #if defined(OS_WIN) | 31 #if defined(OS_WIN) |
27 // Windows 8 specific: Like AttemptRestart but if chrome is running | 32 // Windows 8 specific: Like AttemptRestart but if chrome is running |
28 // in desktop mode it starts in metro mode and vice-versa. The switching like | 33 // in desktop mode it starts in metro mode and vice-versa. The switching like |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // processing required. | 90 // processing required. |
86 void HandleAppExitingForPlatform(); | 91 void HandleAppExitingForPlatform(); |
87 | 92 |
88 // Returns true if we can start the shutdown sequence for the browser, i.e. the | 93 // Returns true if we can start the shutdown sequence for the browser, i.e. the |
89 // last browser window is being closed. | 94 // last browser window is being closed. |
90 bool ShouldStartShutdown(Browser* browser); | 95 bool ShouldStartShutdown(Browser* browser); |
91 | 96 |
92 } // namespace chrome | 97 } // namespace chrome |
93 | 98 |
94 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 99 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
OLD | NEW |