| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H
_ | 5 #ifndef SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H
_ |
| 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H
_ | 6 #define SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMPL_H
_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 void SetProperty(mojom::PropertyPtr property) override; | 118 void SetProperty(mojom::PropertyPtr property) override; |
| 119 | 119 |
| 120 const CoordinationUnitID& id() const { return id_; } | 120 const CoordinationUnitID& id() const { return id_; } |
| 121 const std::set<CoordinationUnitImpl*>& children() const { return children_; } | 121 const std::set<CoordinationUnitImpl*>& children() const { return children_; } |
| 122 const std::set<CoordinationUnitImpl*>& parents() const { return parents_; } | 122 const std::set<CoordinationUnitImpl*>& parents() const { return parents_; } |
| 123 const std::unordered_map<mojom::PropertyType, base::Value>& | 123 const std::unordered_map<mojom::PropertyType, base::Value>& |
| 124 property_store_for_testing() const { | 124 property_store_for_testing() const { |
| 125 return property_store_; | 125 return property_store_; |
| 126 } | 126 } |
| 127 | 127 |
| 128 static const double kCPUUsageMinimumForTesting; | |
| 129 static const double kCPUUsageUnmeasuredForTesting; | |
| 130 virtual double GetCPUUsageForTesting(); | |
| 131 | |
| 132 // Clear property from internal key-value store | 128 // Clear property from internal key-value store |
| 133 void ClearProperty(mojom::PropertyType property); | 129 void ClearProperty(mojom::PropertyType property); |
| 134 // Retrieve property from internal key-value store | 130 // Retrieve property from internal key-value store |
| 135 base::Value GetProperty(mojom::PropertyType property) const; | 131 base::Value GetProperty(mojom::PropertyType property) const; |
| 136 // Set property from internal key-value store | 132 // Set property from internal key-value store |
| 137 void SetProperty(mojom::PropertyType property, base::Value value); | 133 void SetProperty(mojom::PropertyType property, base::Value value); |
| 138 | 134 |
| 139 // Notify an instance it will be destroyed before its destructor is | 135 // Notify an instance it will be destroyed before its destructor is |
| 140 // actually called. | 136 // actually called. |
| 141 void WillBeDestroyed(); | 137 void WillBeDestroyed(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 CoordinationUnitEventListenerRegistry<OnWillBeDestroyedEventListener, | 222 CoordinationUnitEventListenerRegistry<OnWillBeDestroyedEventListener, |
| 227 CoordinationUnitType> | 223 CoordinationUnitType> |
| 228 on_will_be_destroyed_event_listeners_; | 224 on_will_be_destroyed_event_listeners_; |
| 229 | 225 |
| 230 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitImpl); | 226 DISALLOW_COPY_AND_ASSIGN(CoordinationUnitImpl); |
| 231 }; | 227 }; |
| 232 | 228 |
| 233 } // namespace resource_coordinator | 229 } // namespace resource_coordinator |
| 234 | 230 |
| 235 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP
L_H_ | 231 #endif // SERVICES_RESOURCE_COORDINATOR_COORDINATION_UNIT_COORDINATION_UNIT_IMP
L_H_ |
| OLD | NEW |