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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // Returns true if line power (including a charger of any type) is connected. | 113 // Returns true if line power (including a charger of any type) is connected. |
114 bool IsLinePowerConnected() const; | 114 bool IsLinePowerConnected() const; |
115 | 115 |
116 // Returns true if an official, non-USB charger is connected. | 116 // Returns true if an official, non-USB charger is connected. |
117 bool IsMainsChargerConnected() const; | 117 bool IsMainsChargerConnected() const; |
118 | 118 |
119 // Returns true if a USB charger (which is likely to only support a low | 119 // Returns true if a USB charger (which is likely to only support a low |
120 // charging rate) is connected. | 120 // charging rate) is connected. |
121 bool IsUsbChargerConnected() const; | 121 bool IsUsbChargerConnected() const; |
122 | 122 |
| 123 // Returns true if an original spring charger is connected. |
| 124 bool IsOriginalSpringChargerConnected() const; |
| 125 |
123 // Returns the image that should be shown for the battery's current state. | 126 // Returns the image that should be shown for the battery's current state. |
124 gfx::ImageSkia GetBatteryImage(IconSet icon_set) const; | 127 gfx::ImageSkia GetBatteryImage(IconSet icon_set) const; |
125 | 128 |
126 // Returns an string describing the current state for accessibility. | 129 // Returns an string describing the current state for accessibility. |
127 base::string16 GetAccessibleNameString() const; | 130 base::string16 GetAccessibleNameString() const; |
128 | 131 |
129 // Updates |proto_|. Does not notify observers. | 132 // Updates |proto_|. Does not notify observers. |
130 void SetProtoForTesting(const power_manager::PowerSupplyProperties& proto); | 133 void SetProtoForTesting(const power_manager::PowerSupplyProperties& proto); |
131 | 134 |
132 protected: | 135 protected: |
(...skipping 10 matching lines...) Expand all Loading... |
143 // Current state. | 146 // Current state. |
144 power_manager::PowerSupplyProperties proto_; | 147 power_manager::PowerSupplyProperties proto_; |
145 | 148 |
146 DISALLOW_COPY_AND_ASSIGN(PowerStatus); | 149 DISALLOW_COPY_AND_ASSIGN(PowerStatus); |
147 }; | 150 }; |
148 | 151 |
149 } // namespace internal | 152 } // namespace internal |
150 } // namespace ash | 153 } // namespace ash |
151 | 154 |
152 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ | 155 #endif // ASH_SYSTEM_CHROMEOS_POWER_POWER_STATUS_H_ |
OLD | NEW |