Index: ash/system/chromeos/power/power_status.cc |
diff --git a/ash/system/chromeos/power/power_status.cc b/ash/system/chromeos/power/power_status.cc |
index 8940e9ecb472b8b021a9e7270530541ee6f47a0c..251da6800a747cd582909e3616c65cb633234156 100644 |
--- a/ash/system/chromeos/power/power_status.cc |
+++ b/ash/system/chromeos/power/power_status.cc |
@@ -277,6 +277,20 @@ base::string16 PowerStatus::GetAccessibleNameString() const { |
battery_time_accessible; |
} |
+base::string16 PowerStatus::GetShortAccessibleNameString() const { |
dmazzoni
2014/07/10 17:28:20
Can you call this function from GetAccessibleNameS
evy
2014/07/10 18:57:40
Done.
|
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
+ if (IsBatteryFull()) { |
+ return rb.GetLocalizedString( |
+ IDS_ASH_STATUS_TRAY_BATTERY_FULL_CHARGE_ACCESSIBLE); |
+ } |
+ |
+ return l10n_util::GetStringFUTF16( |
+ IsBatteryCharging() |
+ ? IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_CHARGING_ACCESSIBLE |
+ : IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ACCESSIBLE, |
+ base::IntToString16(GetRoundedBatteryPercent())); |
+} |
+ |
PowerStatus::PowerStatus() { |
chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> |
AddObserver(this); |