| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/common/system/chromeos/power/power_status.h" | 5 #include "ash/common/system/chromeos/power/power_status.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "ash/common/material_design/material_design_controller.h" | 10 #include "ash/common/material_design/material_design_controller.h" |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 void PowerStatus::SetProtoForTesting( | 504 void PowerStatus::SetProtoForTesting( |
| 505 const power_manager::PowerSupplyProperties& proto) { | 505 const power_manager::PowerSupplyProperties& proto) { |
| 506 proto_ = proto; | 506 proto_ = proto; |
| 507 SanitizeProto(&proto_); | 507 SanitizeProto(&proto_); |
| 508 } | 508 } |
| 509 | 509 |
| 510 void PowerStatus::PowerChanged( | 510 void PowerStatus::PowerChanged( |
| 511 const power_manager::PowerSupplyProperties& proto) { | 511 const power_manager::PowerSupplyProperties& proto) { |
| 512 proto_ = proto; | 512 proto_ = proto; |
| 513 SanitizeProto(&proto_); | 513 SanitizeProto(&proto_); |
| 514 FOR_EACH_OBSERVER(Observer, observers_, OnPowerStatusChanged()); | 514 for (auto& observer : observers_) |
| 515 observer.OnPowerStatusChanged(); |
| 515 } | 516 } |
| 516 | 517 |
| 517 } // namespace ash | 518 } // namespace ash |
| OLD | NEW |