| 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 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl
.h" | 5 #include "services/resource_coordinator/coordination_unit/coordination_unit_impl
.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <unordered_map> | 8 #include <unordered_map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 break; | 104 break; |
| 105 case mojom::EventType::kOnWebContentsHidden: | 105 case mojom::EventType::kOnWebContentsHidden: |
| 106 state_flags_[kTabVisible] = false; | 106 state_flags_[kTabVisible] = false; |
| 107 break; | 107 break; |
| 108 case mojom::EventType::kOnProcessAudioStarted: | 108 case mojom::EventType::kOnProcessAudioStarted: |
| 109 state_flags_[kAudioPlaying] = true; | 109 state_flags_[kAudioPlaying] = true; |
| 110 break; | 110 break; |
| 111 case mojom::EventType::kOnProcessAudioStopped: | 111 case mojom::EventType::kOnProcessAudioStopped: |
| 112 state_flags_[kAudioPlaying] = false; | 112 state_flags_[kAudioPlaying] = false; |
| 113 break; | 113 break; |
| 114 case mojom::EventType::kOnLocalFrameNetworkIdle: |
| 115 state_flags_[kNetworkIdle] = true; |
| 116 break; |
| 114 case mojom::EventType::kTestEvent: | 117 case mojom::EventType::kTestEvent: |
| 115 state_flags_[kTestState] = true; | 118 state_flags_[kTestState] = true; |
| 116 break; | 119 break; |
| 117 default: | 120 default: |
| 118 return; | 121 return; |
| 119 } | 122 } |
| 120 | 123 |
| 121 RecalcCoordinationPolicy(); | 124 RecalcCoordinationPolicy(); |
| 122 } | 125 } |
| 123 | 126 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 // value from storage | 258 // value from storage |
| 256 if (value.IsType(base::Value::Type::NONE)) { | 259 if (value.IsType(base::Value::Type::NONE)) { |
| 257 ClearProperty(property); | 260 ClearProperty(property); |
| 258 return; | 261 return; |
| 259 } | 262 } |
| 260 | 263 |
| 261 property_store_[property] = value; | 264 property_store_[property] = value; |
| 262 } | 265 } |
| 263 | 266 |
| 264 } // namespace resource_coordinator | 267 } // namespace resource_coordinator |
| OLD | NEW |