OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TRAY_POWER_H_ | 5 #ifndef ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 6 #define ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
7 | 7 |
8 #include "ash/system/tray/system_tray_item.h" | 8 #include "ash/system/tray/system_tray_item.h" |
9 #include "chromeos/power/power_manager_handler.h" | 9 #include "chromeos/power/power_manager_handler.h" |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // |supply_status|. | 68 // |supply_status|. |
69 static int GetBatteryImageOffset( | 69 static int GetBatteryImageOffset( |
70 const chromeos::PowerSupplyStatus& supply_status); | 70 const chromeos::PowerSupplyStatus& supply_status); |
71 | 71 |
72 // Looks up the actual icon in the icon array image for |image_index|. | 72 // Looks up the actual icon in the icon array image for |image_index|. |
73 static gfx::ImageSkia GetBatteryImage(int image_index, | 73 static gfx::ImageSkia GetBatteryImage(int image_index, |
74 int image_offset, | 74 int image_offset, |
75 bool charging_unreliable, | 75 bool charging_unreliable, |
76 IconSet icon_set); | 76 IconSet icon_set); |
77 | 77 |
78 // Returns an icon for the USB charger notification. | |
79 static gfx::Image GetUsbChargerNotificationImage(); | |
80 | |
81 // Gets the battery accessible string for |supply_status|. | 78 // Gets the battery accessible string for |supply_status|. |
82 static base::string16 GetAccessibleNameString( | 79 static base::string16 GetAccessibleNameString( |
83 const chromeos::PowerSupplyStatus& supply_status); | 80 const chromeos::PowerSupplyStatus& supply_status); |
84 | 81 |
85 // Gets rounded battery percentage for |battery_percentage|. | 82 // Gets rounded battery percentage for |battery_percentage|. |
86 static int GetRoundedBatteryPercentage(double battery_percentage); | 83 static int GetRoundedBatteryPercentage(double battery_percentage); |
87 | 84 |
88 private: | 85 private: |
89 friend class TrayPowerTest; | 86 friend class TrayPowerTest; |
90 | 87 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Power supply status at the last update. | 124 // Power supply status at the last update. |
128 chromeos::PowerSupplyStatus last_power_supply_status_; | 125 chromeos::PowerSupplyStatus last_power_supply_status_; |
129 | 126 |
130 DISALLOW_COPY_AND_ASSIGN(TrayPower); | 127 DISALLOW_COPY_AND_ASSIGN(TrayPower); |
131 }; | 128 }; |
132 | 129 |
133 } // namespace internal | 130 } // namespace internal |
134 } // namespace ash | 131 } // namespace ash |
135 | 132 |
136 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ | 133 #endif // ASH_SYSTEM_CHROMEOS_POWER_TRAY_POWER_H_ |
OLD | NEW |