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/system/power/power_status.h" | 5 #include "ash/system/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/material_design/material_design_controller.h" |
11 #include "ash/resources/grit/ash_resources.h" | 11 #include "ash/resources/grit/ash_resources.h" |
12 #include "ash/resources/vector_icons/vector_icons.h" | 12 #include "ash/resources/vector_icons/vector_icons.h" |
13 #include "ash/strings/grit/ash_strings.h" | 13 #include "ash/strings/grit/ash_strings.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "chromeos/dbus/dbus_thread_manager.h" | 17 #include "chromeos/dbus/dbus_thread_manager.h" |
18 #include "chromeos/dbus/power_manager_client.h" | 18 #include "chromeos/dbus/power_manager_client.h" |
19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
20 #include "ui/base/l10n/time_format.h" | 20 #include "ui/base/l10n/time_format.h" |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 (auto& observer : observers_) | 514 for (auto& observer : observers_) |
515 observer.OnPowerStatusChanged(); | 515 observer.OnPowerStatusChanged(); |
516 } | 516 } |
517 | 517 |
518 } // namespace ash | 518 } // namespace ash |
OLD | NEW |