| 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_REGISTRY_H_ | 5 #ifndef CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_ |
| 6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_ | 6 #define CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_ |
| 7 | 7 |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 | 14 |
| 14 enum class KeepAliveOrigin; | 15 enum class KeepAliveOrigin; |
| 15 enum class KeepAliveRestartOption; | 16 enum class KeepAliveRestartOption; |
| 16 class KeepAliveStateObserver; | 17 class KeepAliveStateObserver; |
| 17 | 18 |
| 18 // Centralized registry that objects in the browser can use to | 19 // Centralized registry that objects in the browser can use to |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // Number of registered keep alives that have KeepAliveRestartOption::ENABLED. | 87 // Number of registered keep alives that have KeepAliveRestartOption::ENABLED. |
| 87 int restart_allowed_count_; | 88 int restart_allowed_count_; |
| 88 | 89 |
| 89 base::ObserverList<KeepAliveStateObserver> observers_; | 90 base::ObserverList<KeepAliveStateObserver> observers_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(KeepAliveRegistry); | 92 DISALLOW_COPY_AND_ASSIGN(KeepAliveRegistry); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 | 95 |
| 95 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_ | 96 #endif // CHROME_BROWSER_LIFETIME_KEEP_ALIVE_REGISTRY_H_ |
| OLD | NEW |