diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 05:37:15 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-21 05:37:15 +0000 |
commit | 2686040bc4b822b94cc5a08571a5210486428fa1 (patch) | |
tree | e0d49c97751b2246f374d4f36183c142d7d6accf /ash | |
parent | 52c9e7a91d7e19890c2426cc9b1440a1f2802e28 (diff) | |
download | chromium_src-2686040bc4b822b94cc5a08571a5210486428fa1.zip chromium_src-2686040bc4b822b94cc5a08571a5210486428fa1.tar.gz chromium_src-2686040bc4b822b94cc5a08571a5210486428fa1.tar.bz2 |
cros: Use custom icon for low-power charger notification
Wires up an existing art asset
BUG=249852
TEST=visual, it uses the new art
Review URL: https://chromiumcodereview.appspot.com/17517004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207719 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/resources/ash_resources.grd | 1 | ||||
-rw-r--r-- | ash/system/chromeos/power/tray_power.cc | 10 | ||||
-rw-r--r-- | ash/system/chromeos/power/tray_power.h | 3 |
3 files changed, 2 insertions, 12 deletions
diff --git a/ash/resources/ash_resources.grd b/ash/resources/ash_resources.grd index c858b32..e061fb1 100644 --- a/ash/resources/ash_resources.grd +++ b/ash/resources/ash_resources.grd @@ -132,6 +132,7 @@ <!-- ChromeOS specific icons --> <if expr="pp_ifdef('chromeos')"> + <structure type="chrome_scaled_image" name="IDR_AURA_NOTIFICATION_LOW_POWER_CHARGER" file="cros/notification/notification_low_power_charger.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_ENTERPRISE_DARK" file="cros/status/status_managed.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_MANAGED_USER" file="cros/status/status_managed_mode_user.png" /> <structure type="chrome_scaled_image" name="IDR_AURA_UBER_TRAY_NETWORK_1X" file="cros/network/statusbar_network_1x.png" /> diff --git a/ash/system/chromeos/power/tray_power.cc b/ash/system/chromeos/power/tray_power.cc index 81ec561..66bd5c5 100644 --- a/ash/system/chromeos/power/tray_power.cc +++ b/ash/system/chromeos/power/tray_power.cc @@ -281,14 +281,6 @@ gfx::ImageSkia TrayPower::GetBatteryImage(int image_index, } // static -gfx::Image TrayPower::GetUsbChargerNotificationImage() { - // TODO(jamescook): Use a specialized art asset here. - gfx::ImageSkia icon = - GetBatteryImage(kNumPowerImages - 1, 0, true, ICON_LIGHT); - return gfx::Image(icon); -} - -// static base::string16 TrayPower::GetAccessibleNameString( const chromeos::PowerSupplyStatus& supply_status) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); @@ -443,7 +435,7 @@ bool TrayPower::MaybeShowUsbChargerNotification( kNotificationId, rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_TITLE), rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_MESSAGE), - GetUsbChargerNotificationImage(), + rb.GetImageNamed(IDR_AURA_NOTIFICATION_LOW_POWER_CHARGER), base::string16(), std::string(), message_center::RichNotificationData(), diff --git a/ash/system/chromeos/power/tray_power.h b/ash/system/chromeos/power/tray_power.h index 7e193c3..97d67697 100644 --- a/ash/system/chromeos/power/tray_power.h +++ b/ash/system/chromeos/power/tray_power.h @@ -75,9 +75,6 @@ class ASH_EXPORT TrayPower : public SystemTrayItem, bool charging_unreliable, IconSet icon_set); - // Returns an icon for the USB charger notification. - static gfx::Image GetUsbChargerNotificationImage(); - // Gets the battery accessible string for |supply_status|. static base::string16 GetAccessibleNameString( const chromeos::PowerSupplyStatus& supply_status); |