| 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 #ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| 6 #define ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" | 13 #include "chromeos/dbus/power_manager/power_supply_properties.pb.h" |
| 14 #include "chromeos/dbus/power_manager_client.h" | 14 #include "chromeos/dbus/power_manager_client.h" |
| 15 #include "ui/gfx/image/image_skia.h" | 15 #include "ui/gfx/image/image_skia.h" |
| 16 | 16 |
| 17 namespace ash { | 17 namespace ash { |
| 18 namespace internal { | |
| 19 | 18 |
| 20 // PowerStatus is a singleton that receives updates about the system's | 19 // PowerStatus is a singleton that receives updates about the system's |
| 21 // power status from chromeos::PowerManagerClient and makes the information | 20 // power status from chromeos::PowerManagerClient and makes the information |
| 22 // available to interested classes within Ash. | 21 // available to interested classes within Ash. |
| 23 class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer { | 22 class ASH_EXPORT PowerStatus : public chromeos::PowerManagerClient::Observer { |
| 24 public: | 23 public: |
| 25 // Different styles of battery icons. | 24 // Different styles of battery icons. |
| 26 enum IconSet { | 25 enum IconSet { |
| 27 ICON_LIGHT, | 26 ICON_LIGHT, |
| 28 ICON_DARK | 27 ICON_DARK |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 const power_manager::PowerSupplyProperties& proto) OVERRIDE; | 144 const power_manager::PowerSupplyProperties& proto) OVERRIDE; |
| 146 | 145 |
| 147 ObserverList<Observer> observers_; | 146 ObserverList<Observer> observers_; |
| 148 | 147 |
| 149 // Current state. | 148 // Current state. |
| 150 power_manager::PowerSupplyProperties proto_; | 149 power_manager::PowerSupplyProperties proto_; |
| 151 | 150 |
| 152 DISALLOW_COPY_AND_ASSIGN(PowerStatus); | 151 DISALLOW_COPY_AND_ASSIGN(PowerStatus); |
| 153 }; | 152 }; |
| 154 | 153 |
| 155 } // namespace internal | |
| 156 } // namespace ash | 154 } // namespace ash |
| 157 | 155 |
| 158 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 156 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| OLD | NEW |