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 |
| 18 APP_CONTROLLER, |
| 19 BROWSER_PROCESS_CHROMEOS, |
| 20 |
17 // c/b/background | 21 // c/b/background |
18 BACKGROUND_MODE_MANAGER, | 22 BACKGROUND_MODE_MANAGER, |
19 BACKGROUND_MODE_MANAGER_STARTUP, | 23 BACKGROUND_MODE_MANAGER_STARTUP, |
20 | 24 |
| 25 // c/b/chromeos |
| 26 LOGIN_DISPLAY_HOST_IMPL, |
| 27 |
21 // c/b/ui | 28 // c/b/ui |
22 APP_LIST_SERVICE_VIEWS, | 29 APP_LIST_SERVICE_VIEWS, |
23 APP_LIST_SHOWER, | 30 APP_LIST_SHOWER, |
24 CHROME_APP_DELEGATE, | 31 CHROME_APP_DELEGATE, |
| 32 PANEL, |
25 PANEL_VIEW, | 33 PANEL_VIEW, |
26 PROFILE_LOADER, | 34 PROFILE_LOADER, |
27 USER_MANAGER_VIEW | 35 USER_MANAGER_VIEW |
28 }; | 36 }; |
29 | 37 |
30 // Restart: Allow Chrome to restart when all the registered KeepAlives allow | 38 // Restart: Allow Chrome to restart when all the registered KeepAlives allow |
31 // restarts | 39 // restarts |
32 enum class KeepAliveRestartOption { DISABLED, ENABLED }; | 40 enum class KeepAliveRestartOption { DISABLED, ENABLED }; |
33 | 41 |
34 #ifndef NDEBUG | 42 #ifndef NDEBUG |
35 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin); | 43 std::ostream& operator<<(std::ostream& out, const KeepAliveOrigin& origin); |
36 std::ostream& operator<<(std::ostream& out, | 44 std::ostream& operator<<(std::ostream& out, |
37 const KeepAliveRestartOption& restart); | 45 const KeepAliveRestartOption& restart); |
38 #endif // ndef NDEBUG | 46 #endif // ndef NDEBUG |
39 | 47 |
40 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ | 48 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_TYPES_H_ |
OLD | NEW |