Chromium Code Reviews| 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 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 void SessionEnding(); | 69 void SessionEnding(); |
| 70 | 70 |
| 71 #endif // !defined(OS_ANDROID) | 71 #endif // !defined(OS_ANDROID) |
| 72 | 72 |
| 73 // Emits APP_TERMINATING notification. It is guaranteed that the | 73 // Emits APP_TERMINATING notification. It is guaranteed that the |
| 74 // notification is sent only once. | 74 // notification is sent only once. |
| 75 void NotifyAppTerminating(); | 75 void NotifyAppTerminating(); |
| 76 | 76 |
| 77 // Send out notifications. | 77 // Send out notifications. |
| 78 // For ChromeOS, also request session manager to end the session. | 78 // For ChromeOS, also request session manager to end the session. |
| 79 // |lifetime| is used to signal whether or not a reboot should be forced. By | |
| 80 // default, the functions only reboot the system if an update is available. When | |
| 81 // a component flash update is present, but not a system update, the | |
| 82 // kForceReboot flag is passed. | |
| 83 enum class ApplicationLifetime { kForceReboot, kOptionalReboot }; | |
|
James Cook
2016/12/03 00:18:20
nit: I wouldn't call the class itself ApplicationL
Nico
2016/12/03 00:23:13
Yes, I thought this was in a class and used a plai
Greg K
2016/12/06 00:13:15
Done.
| |
| 79 void NotifyAndTerminate(bool fast_path); | 84 void NotifyAndTerminate(bool fast_path); |
| 85 void NotifyAndTerminate(bool fast_path, ApplicationLifetime lifetime); | |
| 80 | 86 |
| 81 #if !defined(OS_ANDROID) | 87 #if !defined(OS_ANDROID) |
| 82 // Called once the application is exiting. | 88 // Called once the application is exiting. |
| 83 void OnAppExiting(); | 89 void OnAppExiting(); |
| 84 | 90 |
| 85 // Called once the application is exiting to do any platform specific | 91 // Called once the application is exiting to do any platform specific |
| 86 // processing required. | 92 // processing required. |
| 87 void HandleAppExitingForPlatform(); | 93 void HandleAppExitingForPlatform(); |
| 88 #endif // !defined(OS_ANDROID) | 94 #endif // !defined(OS_ANDROID) |
| 89 | 95 |
| 90 } // namespace chrome | 96 } // namespace chrome |
| 91 | 97 |
| 92 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ | 98 #endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_ |
| OLD | NEW |