| 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" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 gfx::ImageSkia GetBatteryImage(IconSet icon_set) const; | 126 gfx::ImageSkia GetBatteryImage(IconSet icon_set) const; |
| 127 | 127 |
| 128 // Returns an string describing the current state for accessibility. | 128 // Returns an string describing the current state for accessibility. |
| 129 base::string16 GetAccessibleNameString(bool full_description) const; | 129 base::string16 GetAccessibleNameString(bool full_description) const; |
| 130 | 130 |
| 131 // Updates |proto_|. Does not notify observers. | 131 // Updates |proto_|. Does not notify observers. |
| 132 void SetProtoForTesting(const power_manager::PowerSupplyProperties& proto); | 132 void SetProtoForTesting(const power_manager::PowerSupplyProperties& proto); |
| 133 | 133 |
| 134 protected: | 134 protected: |
| 135 PowerStatus(); | 135 PowerStatus(); |
| 136 virtual ~PowerStatus(); | 136 ~PowerStatus() override; |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 // Overriden from PowerManagerClient::Observer. | 139 // Overriden from PowerManagerClient::Observer. |
| 140 virtual void PowerChanged( | 140 void PowerChanged(const power_manager::PowerSupplyProperties& proto) override; |
| 141 const power_manager::PowerSupplyProperties& proto) override; | |
| 142 | 141 |
| 143 ObserverList<Observer> observers_; | 142 ObserverList<Observer> observers_; |
| 144 | 143 |
| 145 // Current state. | 144 // Current state. |
| 146 power_manager::PowerSupplyProperties proto_; | 145 power_manager::PowerSupplyProperties proto_; |
| 147 | 146 |
| 148 DISALLOW_COPY_AND_ASSIGN(PowerStatus); | 147 DISALLOW_COPY_AND_ASSIGN(PowerStatus); |
| 149 }; | 148 }; |
| 150 | 149 |
| 151 } // namespace ash | 150 } // namespace ash |
| 152 | 151 |
| 153 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 152 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| OLD | NEW |