Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/browser_shutdown.h

Issue 8271003: Shutdown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #pragma once 7 #pragma once
8 8
9 class PrefService; 9 class PrefService;
10 10
11 namespace browser_shutdown { 11 namespace browser_shutdown {
12 12
13 // Should Shutdown() delete the ResourceBundle? This is normally true, but set 13 // Should Shutdown() delete the ResourceBundle? This is normally true, but set
14 // to false for in process unit tests. 14 // to false for in process unit tests.
15 extern bool delete_resources_on_shutdown; 15 extern bool delete_resources_on_shutdown;
16 16
17 enum ShutdownType { 17 enum ShutdownType {
18 // an uninitialized value 18 // an uninitialized value
19 NOT_VALID = 0, 19 NOT_VALID = 0,
20 // the last browser window was closed 20 // the last browser window was closed
21 WINDOW_CLOSE, 21 WINDOW_CLOSE,
22 // user clicked on the Exit menu item 22 // user clicked on the Exit menu item
23 BROWSER_EXIT, 23 BROWSER_EXIT,
24 // windows is logging off or shutting down 24 // OS is logging off or powering off. Close all tabs forcibly.
25 END_SESSION 25 POWER_OFF,
26 // X11 is dead. Shutdown without closing browsers.
27 SHUTDOWN_WITHOUT_CLOSE,
26 }; 28 };
27 29
28 void RegisterPrefs(PrefService* local_state); 30 void RegisterPrefs(PrefService* local_state);
29 31
30 // Called when the browser starts shutting down so that we can measure shutdown 32 // Called when the browser starts shutting down so that we can measure shutdown
31 // time. 33 // time.
32 void OnShutdownStarting(ShutdownType type); 34 void OnShutdownStarting(ShutdownType type);
33 35
34 // Get the current shutdown type. 36 // Get the current shutdown type.
35 ShutdownType GetShutdownType(); 37 ShutdownType GetShutdownType();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 bool IsTryingToQuit(); 69 bool IsTryingToQuit();
68 70
69 // This is true on X during an END_SESSION, when we can no longer depend 71 // This is true on X during an END_SESSION, when we can no longer depend
70 // on the X server to be running. As a result we don't explicitly close the 72 // on the X server to be running. As a result we don't explicitly close the
71 // browser windows, which can lead to conditions which would fail checks. 73 // browser windows, which can lead to conditions which would fail checks.
72 bool ShuttingDownWithoutClosingBrowsers(); 74 bool ShuttingDownWithoutClosingBrowsers();
73 75
74 } // namespace browser_shutdown 76 } // namespace browser_shutdown
75 77
76 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__ 78 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698