| 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 "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" | 
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" | 
| 10 | 10 | 
| 11 class Browser; | 11 class Browser; | 
| 12 | 12 | 
| 13 namespace chrome { | 13 namespace chrome { | 
| 14 | 14 | 
| 15 // Starts a user initiated exit process. Called from Browser::Exit. | 15 // Starts a user initiated exit process. Called from Browser::Exit. | 
| 16 // On platforms other than ChromeOS, this is equivalent to | 16 // On platforms other than ChromeOS, this is equivalent to | 
| 17 // CloseAllBrowsers() On ChromeOS, this tells session manager | 17 // CloseAllBrowsers() On ChromeOS, this tells session manager | 
| 18 // that chrome is signing out, which lets session manager send | 18 // that chrome is signing out, which lets session manager send | 
| 19 // SIGTERM to start actual exit process. | 19 // SIGTERM to start actual exit process. | 
| 20 void AttemptUserExit(); | 20 void AttemptUserExit(); | 
| 21 | 21 | 
| 22 // Starts a user initiated restart process. On platforms other than | 22 // Starts a user initiated restart process. On platforms other than | 
| 23 // chromeos, this sets a restart bit in the preference so that | 23 // chromeos, this sets a restart bit in the preference so that | 
| 24 // chrome will be restarted at the end of shutdown process. On | 24 // chrome will be restarted at the end of shutdown process. On | 
| 25 // ChromeOS, this simply exits the chrome, which lets sesssion | 25 // ChromeOS, this simply exits the chrome, which lets sesssion | 
| 26 // manager re-launch the browser with restore last session flag. | 26 // manager re-launch the browser with restore last session flag. | 
| 27 void AttemptRestart(); | 27 void AttemptRestart(); | 
| 28 | 28 | 
| 29 #if defined(OS_WIN) |  | 
| 30 enum AshExecutionStatus { |  | 
| 31   ASH_KEEP_RUNNING, |  | 
| 32   ASH_TERMINATE, |  | 
| 33 }; |  | 
| 34 |  | 
| 35 // Helper function to activate the desktop from Ash mode. The |  | 
| 36 // |ash_execution_status| parameter indicates if we should exit Ash after |  | 
| 37 // activating desktop. |  | 
| 38 void ActivateDesktopHelper(AshExecutionStatus ash_execution_status); |  | 
| 39 |  | 
| 40 // Windows 7/8 specific: Like AttemptRestart but if chrome is running |  | 
| 41 // in desktop mode it starts in metro mode and vice-versa. The switching like |  | 
| 42 // the restarting is controlled by a preference. |  | 
| 43 void AttemptRestartToDesktopMode(); |  | 
| 44 // Launches Chrome into Windows 8 metro mode on Windows 8. On Windows 7 it |  | 
| 45 // launches Chrome into Windows ASH. |  | 
| 46 void AttemptRestartToMetroMode(); |  | 
| 47 #endif |  | 
| 48 |  | 
| 49 // Attempt to exit by closing all browsers.  This is equivalent to | 29 // Attempt to exit by closing all browsers.  This is equivalent to | 
| 50 // CloseAllBrowsers() on platforms where the application exits | 30 // CloseAllBrowsers() on platforms where the application exits | 
| 51 // when no more windows are remaining. On other platforms (the Mac), | 31 // when no more windows are remaining. On other platforms (the Mac), | 
| 52 // this will additionally exit the application if all browsers are | 32 // this will additionally exit the application if all browsers are | 
| 53 // successfully closed. | 33 // successfully closed. | 
| 54 //  Note that he exit process may be interrupted by download or | 34 //  Note that he exit process may be interrupted by download or | 
| 55 // unload handler, and the browser may or may not exit. | 35 // unload handler, and the browser may or may not exit. | 
| 56 void AttemptExit(); | 36 void AttemptExit(); | 
| 57 | 37 | 
| 58 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) | 
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 107 // Called once the application is exiting to do any platform specific | 87 // Called once the application is exiting to do any platform specific | 
| 108 // processing required. | 88 // processing required. | 
| 109 void HandleAppExitingForPlatform(); | 89 void HandleAppExitingForPlatform(); | 
| 110 | 90 | 
| 111 // Disable browser shutdown for unit tests. | 91 // Disable browser shutdown for unit tests. | 
| 112 void DisableShutdownForTesting(bool disable_shutdown_for_testing); | 92 void DisableShutdownForTesting(bool disable_shutdown_for_testing); | 
| 113 | 93 | 
| 114 }  // namespace chrome | 94 }  // namespace chrome | 
| 115 | 95 | 
| 116 #endif  // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 96 #endif  // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 
| OLD | NEW | 
|---|