OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_KEEP_ALIVE_TYPES_H_ | 5 #ifndef CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ |
6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ | 6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 // Types here are used to register KeepAlives. | 10 // Types here are used to register KeepAlives. |
11 // They Give indications about which kind of optimizations are allowed during | 11 // They Give indications about which kind of optimizations are allowed during |
12 // the KeepAlive's lifetime. This allows to have more info about the state of | 12 // the KeepAlive's lifetime. This allows to have more info about the state of |
13 // the browser to optimize the resource consumption. | 13 // the browser to optimize the resource consumption. |
14 | 14 |
15 // Refers to the what the KeepAlive's lifetime is tied to, to help debugging. | 15 // Refers to the what the KeepAlive's lifetime is tied to, to help debugging. |
16 enum class KeepAliveOrigin { | 16 enum class KeepAliveOrigin { |
17 // c/b | 17 // c/b |
18 APP_CONTROLLER, | 18 APP_CONTROLLER, |
| 19 BROWSER, |
19 BROWSER_PROCESS_CHROMEOS, | 20 BROWSER_PROCESS_CHROMEOS, |
| 21 SESSION_RESTORE, |
20 | 22 |
21 // c/b/background | 23 // c/b/background |
22 BACKGROUND_MODE_MANAGER, | 24 BACKGROUND_MODE_MANAGER, |
23 BACKGROUND_MODE_MANAGER_STARTUP, | 25 BACKGROUND_MODE_MANAGER_STARTUP, |
24 | 26 |
25 // c/b/chromeos | 27 // c/b/chromeos |
26 LOGIN_DISPLAY_HOST_IMPL, | 28 LOGIN_DISPLAY_HOST_IMPL, |
27 | 29 |
28 // c/b/ui | 30 // c/b/ui |
29 APP_LIST_SERVICE_VIEWS, | 31 APP_LIST_SERVICE_VIEWS, |
30 APP_LIST_SHOWER, | 32 APP_LIST_SHOWER, |
31 CHROME_APP_DELEGATE, | 33 CHROME_APP_DELEGATE, |
| 34 CHROME_VIEWS_DELEGATE, |
| 35 LEAKED_UNINSTALL_VIEW, |
32 PANEL, | 36 PANEL, |
33 PANEL_VIEW, | 37 PANEL_VIEW, |
34 PROFILE_LOADER, | 38 PROFILE_LOADER, |
35 USER_MANAGER_VIEW | 39 USER_MANAGER_VIEW |
36 }; | 40 }; |
37 | 41 |
38 // Restart: Allow Chrome to restart when all the registered KeepAlives allow | 42 // Restart: Allow Chrome to restart when all the registered KeepAlives allow |
39 // restarts | 43 // restarts |
40 enum class KeepAliveRestartOption { DISABLED, ENABLED }; | 44 enum class KeepAliveRestartOption { DISABLED, ENABLED }; |
41 | 45 |
42 #ifndef NDEBUG | 46 #ifndef NDEBUG |
43 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin); | 47 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin); |
44 std::ostream& operator<<(std::ostream& out, | 48 std::ostream& operator<<(std::ostream& out, |
45 const KeepAliveRestartOption& restart); | 49 const KeepAliveRestartOption& restart); |
46 #endif // ndef NDEBUG | 50 #endif // ndef NDEBUG |
47 | 51 |
48 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ | 52 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ |
OLD | NEW |