| Index: ash/system/tray/system_menu_button.cc
|
| diff --git a/ash/system/tray/system_menu_button.cc b/ash/system/tray/system_menu_button.cc
|
| index 8afd07b18853ff25e4353176e6e13574cc797df9..dc32f5049ecb2e9a529fb1c28dfcdad17a2c8990 100644
|
| --- a/ash/system/tray/system_menu_button.cc
|
| +++ b/ash/system/tray/system_menu_button.cc
|
| @@ -22,15 +22,15 @@ namespace ash {
|
|
|
| SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
|
| TrayPopupInkDropStyle ink_drop_style,
|
| - gfx::ImageSkia normal_icon,
|
| - gfx::ImageSkia disabled_icon,
|
| + const gfx::ImageSkia& normal_icon,
|
| + const gfx::ImageSkia& disabled_icon,
|
| int accessible_name_id)
|
| : views::ImageButton(listener), ink_drop_style_(ink_drop_style) {
|
| DCHECK_EQ(normal_icon.width(), disabled_icon.width());
|
| DCHECK_EQ(normal_icon.height(), disabled_icon.height());
|
|
|
| - SetImage(views::Button::STATE_NORMAL, &normal_icon);
|
| - SetImage(views::Button::STATE_DISABLED, &disabled_icon);
|
| + SetImage(views::Button::STATE_NORMAL, normal_icon);
|
| + SetImage(views::Button::STATE_DISABLED, disabled_icon);
|
|
|
| const int horizontal_padding = (kMenuButtonSize - normal_icon.width()) / 2;
|
| const int vertical_padding = (kMenuButtonSize - normal_icon.height()) / 2;
|
| @@ -49,9 +49,18 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
|
| int accessible_name_id)
|
| : SystemMenuButton(listener,
|
| ink_drop_style,
|
| - gfx::CreateVectorIcon(icon, kMenuIconColor),
|
| - gfx::CreateVectorIcon(icon, kMenuIconColorDisabled),
|
| - accessible_name_id) {}
|
| + gfx::ImageSkia(),
|
| + gfx::ImageSkia(),
|
| + accessible_name_id) {
|
| + SetVectorIcon(icon);
|
| +}
|
| +
|
| +void SystemMenuButton::SetVectorIcon(const gfx::VectorIcon& icon) {
|
| + SetImage(views::Button::STATE_NORMAL,
|
| + gfx::CreateVectorIcon(icon, kMenuIconColor));
|
| + SetImage(views::Button::STATE_DISABLED,
|
| + gfx::CreateVectorIcon(icon, kMenuIconColorDisabled));
|
| +}
|
|
|
| SystemMenuButton::~SystemMenuButton() {}
|
|
|
|
|