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_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 PrefServiceSimple; |
9 | 9 |
10 namespace browser_shutdown { | 10 namespace browser_shutdown { |
11 | 11 |
12 enum ShutdownType { | 12 enum ShutdownType { |
13 // an uninitialized value | 13 // an uninitialized value |
14 NOT_VALID = 0, | 14 NOT_VALID = 0, |
15 // the last browser window was closed | 15 // the last browser window was closed |
16 WINDOW_CLOSE, | 16 WINDOW_CLOSE, |
17 // user clicked on the Exit menu item | 17 // user clicked on the Exit menu item |
18 BROWSER_EXIT, | 18 BROWSER_EXIT, |
19 // windows is logging off or shutting down | 19 // windows is logging off or shutting down |
20 END_SESSION | 20 END_SESSION |
21 }; | 21 }; |
22 | 22 |
23 void RegisterPrefs(PrefService* local_state); | 23 void RegisterPrefs(PrefServiceSimple* local_state); |
24 | 24 |
25 // Called when the browser starts shutting down so that we can measure shutdown | 25 // Called when the browser starts shutting down so that we can measure shutdown |
26 // time. | 26 // time. |
27 void OnShutdownStarting(ShutdownType type); | 27 void OnShutdownStarting(ShutdownType type); |
28 | 28 |
29 // Get the current shutdown type. | 29 // Get the current shutdown type. |
30 ShutdownType GetShutdownType(); | 30 ShutdownType GetShutdownType(); |
31 | 31 |
32 // Performs the shutdown tasks that need to be done before | 32 // Performs the shutdown tasks that need to be done before |
33 // BrowserProcess and the various threads go away. | 33 // BrowserProcess and the various threads go away. |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // explicitly close the browser windows, which can lead to conditions which | 71 // explicitly close the browser windows, which can lead to conditions which |
72 // would fail checks. | 72 // would fail checks. |
73 bool ShuttingDownWithoutClosingBrowsers(); | 73 bool ShuttingDownWithoutClosingBrowsers(); |
74 | 74 |
75 // Sets the ShuttingDownWithoutClosingBrowsers flag. | 75 // Sets the ShuttingDownWithoutClosingBrowsers flag. |
76 void SetShuttingDownWithoutClosingBrowsers(bool without_close); | 76 void SetShuttingDownWithoutClosingBrowsers(bool without_close); |
77 | 77 |
78 } // namespace browser_shutdown | 78 } // namespace browser_shutdown |
79 | 79 |
80 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ | 80 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ |
OLD | NEW |