| 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_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 5 #ifndef ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| 6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 6 #define ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Returns a list of available power sources which the user may select. | 185 // Returns a list of available power sources which the user may select. |
| 186 std::vector<PowerSource> GetPowerSources() const; | 186 std::vector<PowerSource> GetPowerSources() const; |
| 187 | 187 |
| 188 // Returns the ID of the currently used power source, or an empty string if no | 188 // Returns the ID of the currently used power source, or an empty string if no |
| 189 // power source is selected. | 189 // power source is selected. |
| 190 std::string GetCurrentPowerSourceID() const; | 190 std::string GetCurrentPowerSourceID() const; |
| 191 | 191 |
| 192 // Returns information about the image that would be returned by | 192 // Returns information about the image that would be returned by |
| 193 // GetBatteryImage(). This can be cached and compared against future objects | 193 // GetBatteryImage(). This can be cached and compared against future objects |
| 194 // returned by this method to avoid creating new images unnecessarily. | 194 // returned by this method to avoid creating new images unnecessarily. |
| 195 BatteryImageInfo GetBatteryImageInfo(IconSet icon_set) const; | 195 BatteryImageInfo GetBatteryImageInfo() const; |
| 196 | 196 |
| 197 // A helper function called by GetBatteryImageInfo(). Populates the fields of | 197 // A helper function called by GetBatteryImageInfo(). Populates the fields of |
| 198 // |info|. | 198 // |info|. |
| 199 void CalculateBatteryImageInfo(BatteryImageInfo* info) const; | 199 void CalculateBatteryImageInfo(BatteryImageInfo* info) const; |
| 200 | 200 |
| 201 // Creates a new image that should be shown for the battery's current state. | 201 // Creates a new image that should be shown for the battery's current state. |
| 202 gfx::ImageSkia GetBatteryImage(const BatteryImageInfo& info) const; | 202 gfx::ImageSkia GetBatteryImage(const BatteryImageInfo& info) const; |
| 203 | 203 |
| 204 // Returns an string describing the current state for accessibility. | 204 // Returns an string describing the current state for accessibility. |
| 205 base::string16 GetAccessibleNameString(bool full_description) const; | 205 base::string16 GetAccessibleNameString(bool full_description) const; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 219 | 219 |
| 220 // Current state. | 220 // Current state. |
| 221 power_manager::PowerSupplyProperties proto_; | 221 power_manager::PowerSupplyProperties proto_; |
| 222 | 222 |
| 223 DISALLOW_COPY_AND_ASSIGN(PowerStatus); | 223 DISALLOW_COPY_AND_ASSIGN(PowerStatus); |
| 224 }; | 224 }; |
| 225 | 225 |
| 226 } // namespace ash | 226 } // namespace ash |
| 227 | 227 |
| 228 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 228 #endif // ASH_COMMON_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
| OLD | NEW |