diff options
author | tapted <tapted@chromium.org> | 2016-02-03 17:38:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-04 01:40:11 +0000 |
commit | c6d992cfc6a40efcc64c2a3a048a6fd0d67fb3fc (patch) | |
tree | cc16ecafcf6ae95e02304146ab3f1541b217dfea | |
parent | 5f59a6f6138f0aeafad08c147b3558b77f7c909d (diff) | |
download | chromium_src-c6d992cfc6a40efcc64c2a3a048a6fd0d67fb3fc.zip chromium_src-c6d992cfc6a40efcc64c2a3a048a6fd0d67fb3fc.tar.gz chromium_src-c6d992cfc6a40efcc64c2a3a048a6fd0d67fb3fc.tar.bz2 |
Rename profile switcher button IDR_ identifiers
The constant used for all browser windows on Windows 8 and Windows 10
has "METRO" in the IDR identifier, which is confusing.
Also the identifiers for the same constant on Mac are different, making
it tricky to write generic code.
Non-themed "METRO" and "MAC" IDR identifiers are now called "NATIVE",
matching the AvatarButtonStyle::NATIVE enum constant and allowing the
logic in new_avatar_button.cc to be used on Mac.
Remove an obsolete check for metro mode when picking the assets.
BUG=581097, 565989
Review URL: https://codereview.chromium.org/1640533002
Cr-Commit-Position: refs/heads/master@{#373416}
-rw-r--r-- | chrome/app/theme/theme_resources.grd | 120 | ||||
-rw-r--r-- | chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm | 14 | ||||
-rw-r--r-- | chrome/browser/ui/views/profiles/new_avatar_button.cc | 19 |
3 files changed, 76 insertions, 77 deletions
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd index 64f9119..d8e42c6 100644 --- a/chrome/app/theme/theme_resources.grd +++ b/chrome/app/theme/theme_resources.grd @@ -629,7 +629,7 @@ <structure type="chrome_scaled_image" name="IDR_AVATAR_THEMED_BUTTON_PRESSED_TOP_LEFT" file="win/avatar_button/themed/sign_in_button_pressed_top_left.png" /> <structure type="chrome_scaled_image" name="IDR_AVATAR_THEMED_BUTTON_PRESSED_TOP_RIGHT" file="win/avatar_button/themed/sign_in_button_pressed_top_right.png" /> - <!-- Windows, Aero --> + <!-- Windows 7, Aero --> <structure type="chrome_scaled_image" name="IDR_AVATAR_GLASS_BUTTON_AVATAR" file="win/avatar_button/win7/sign_in_button_avatar.png" /> <structure type="chrome_scaled_image" name="IDR_AVATAR_GLASS_BUTTON_NORMAL_BOTTOM" file="win/avatar_button/win7/sign_in_button_bottom.png" /> <structure type="chrome_scaled_image" name="IDR_AVATAR_GLASS_BUTTON_NORMAL_BOTTOM_LEFT" file="win/avatar_button/win7/sign_in_button_bottom_left.png" /> @@ -659,68 +659,68 @@ <structure type="chrome_scaled_image" name="IDR_AVATAR_GLASS_BUTTON_PRESSED_TOP_LEFT" file="win/avatar_button/win7/sign_in_button_pressed_top_left.png" /> <structure type="chrome_scaled_image" name="IDR_AVATAR_GLASS_BUTTON_PRESSED_TOP_RIGHT" file="win/avatar_button/win7/sign_in_button_pressed_top_right.png" /> - <!-- Windows, metro --> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_AVATAR" file="win/avatar_button/win8/sign_in_button_avatar.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_BOTTOM" file="win/avatar_button/win8/sign_in_button_bottom.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_bottom_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_bottom_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_CENTER" file="win/avatar_button/win8/sign_in_button_center.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_LEFT" file="win/avatar_button/win8/sign_in_button_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_RIGHT" file="win/avatar_button/win8/sign_in_button_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_TOP" file="win/avatar_button/win8/sign_in_button_top.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_top_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_NORMAL_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_top_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_BOTTOM" file="win/avatar_button/win8/sign_in_button_hover_bottom.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_hover_bottom_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_bottom_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_CENTER" file="win/avatar_button/win8/sign_in_button_hover_center.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_LEFT" file="win/avatar_button/win8/sign_in_button_hover_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_TOP" file="win/avatar_button/win8/sign_in_button_hover_top.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_hover_top_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_HOVER_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_top_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_BOTTOM" file="win/avatar_button/win8/sign_in_button_pressed_bottom.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_bottom_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_bottom_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_CENTER" file="win/avatar_button/win8/sign_in_button_pressed_center.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_TOP" file="win/avatar_button/win8/sign_in_button_pressed_top.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_top_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_METRO_BUTTON_PRESSED_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_top_right.png" /> + <!-- Windows 8 and up --> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_AVATAR" file="win/avatar_button/win8/sign_in_button_avatar.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM" file="win/avatar_button/win8/sign_in_button_bottom.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_bottom_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_bottom_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_CENTER" file="win/avatar_button/win8/sign_in_button_center.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_LEFT" file="win/avatar_button/win8/sign_in_button_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_RIGHT" file="win/avatar_button/win8/sign_in_button_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP" file="win/avatar_button/win8/sign_in_button_top.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_top_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_top_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM" file="win/avatar_button/win8/sign_in_button_hover_bottom.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_hover_bottom_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_bottom_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_CENTER" file="win/avatar_button/win8/sign_in_button_hover_center.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_LEFT" file="win/avatar_button/win8/sign_in_button_hover_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP" file="win/avatar_button/win8/sign_in_button_hover_top.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_hover_top_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_hover_top_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM" file="win/avatar_button/win8/sign_in_button_pressed_bottom.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_bottom_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_bottom_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_CENTER" file="win/avatar_button/win8/sign_in_button_pressed_center.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP" file="win/avatar_button/win8/sign_in_button_pressed_top.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP_LEFT" file="win/avatar_button/win8/sign_in_button_pressed_top_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP_RIGHT" file="win/avatar_button/win8/sign_in_button_pressed_top_right.png" /> </if> <!-- toolkit_views and not is_macosx --> <if expr="is_macosx"> <!-- Mac --> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_AVATAR" file="mac/avatar_button/sign_in_button_avatar.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_AVATAR_HOVER" file="mac/avatar_button/sign_in_button_avatar_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_AVATAR_PRESSED" file="mac/avatar_button/sign_in_button_avatar_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_BOTTOM" file="mac/avatar_button/sign_in_button_bottom.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_CENTER" file="mac/avatar_button/sign_in_button_center.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_LEFT" file="mac/avatar_button/sign_in_button_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_RIGHT" file="mac/avatar_button/sign_in_button_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_TOP" file="mac/avatar_button/sign_in_button_top.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_NORMAL_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_BOTTOM" file="mac/avatar_button/sign_in_button_bottom_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_CENTER" file="mac/avatar_button/sign_in_button_center_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_LEFT" file="mac/avatar_button/sign_in_button_left_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_RIGHT" file="mac/avatar_button/sign_in_button_right_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_TOP" file="mac/avatar_button/sign_in_button_top_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_HOVER_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right_hover.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_BOTTOM" file="mac/avatar_button/sign_in_button_bottom_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_CENTER" file="mac/avatar_button/sign_in_button_center_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_LEFT" file="mac/avatar_button/sign_in_button_left_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_RIGHT" file="mac/avatar_button/sign_in_button_right_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_TOP" file="mac/avatar_button/sign_in_button_top_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left_pressed.png" /> - <structure type="chrome_scaled_image" name="IDR_AVATAR_MAC_BUTTON_PRESSED_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_AVATAR" file="mac/avatar_button/sign_in_button_avatar.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_AVATAR_HOVER" file="mac/avatar_button/sign_in_button_avatar_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_AVATAR_PRESSED" file="mac/avatar_button/sign_in_button_avatar_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM" file="mac/avatar_button/sign_in_button_bottom.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_CENTER" file="mac/avatar_button/sign_in_button_center.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_LEFT" file="mac/avatar_button/sign_in_button_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_RIGHT" file="mac/avatar_button/sign_in_button_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP" file="mac/avatar_button/sign_in_button_top.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_NORMAL_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM" file="mac/avatar_button/sign_in_button_bottom_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_CENTER" file="mac/avatar_button/sign_in_button_center_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_LEFT" file="mac/avatar_button/sign_in_button_left_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_RIGHT" file="mac/avatar_button/sign_in_button_right_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP" file="mac/avatar_button/sign_in_button_top_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_HOVER_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right_hover.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM" file="mac/avatar_button/sign_in_button_bottom_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM_LEFT" file="mac/avatar_button/sign_in_button_bottom_left_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_BOTTOM_RIGHT" file="mac/avatar_button/sign_in_button_bottom_right_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_CENTER" file="mac/avatar_button/sign_in_button_center_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_LEFT" file="mac/avatar_button/sign_in_button_left_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_RIGHT" file="mac/avatar_button/sign_in_button_right_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP" file="mac/avatar_button/sign_in_button_top_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP_LEFT" file="mac/avatar_button/sign_in_button_top_left_pressed.png" /> + <structure type="chrome_scaled_image" name="IDR_AVATAR_NATIVE_BUTTON_PRESSED_TOP_RIGHT" file="mac/avatar_button/sign_in_button_top_right_pressed.png" /> <!-- Mac, themed --> <structure type="chrome_scaled_image" name="IDR_AVATAR_THEMED_MAC_BUTTON_NORMAL_BOTTOM" file="mac/avatar_button/sign_in_button_themed_bottom.png" /> diff --git a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm index 6fc1051..d50ebd0 100644 --- a/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/avatar_button_controller.mm @@ -33,11 +33,11 @@ const CGFloat kButtonExtraPadding = 8 - 5; const CGFloat kButtonHeight = 28; const ui::NinePartImageIds kNormalBorderImageIds = - IMAGE_GRID(IDR_AVATAR_MAC_BUTTON_NORMAL); + IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_NORMAL); const ui::NinePartImageIds kHoverBorderImageIds = - IMAGE_GRID(IDR_AVATAR_MAC_BUTTON_HOVER); + IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_HOVER); const ui::NinePartImageIds kPressedBorderImageIds = - IMAGE_GRID(IDR_AVATAR_MAC_BUTTON_PRESSED); + IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_PRESSED); const ui::NinePartImageIds kThemedBorderImageIds = IMAGE_GRID(IDR_AVATAR_THEMED_MAC_BUTTON_NORMAL); @@ -244,15 +244,15 @@ NSImage* GetImageFromResourceID(int resourceId) { base::mac::ObjCCastStrict<AvatarButton>(button_); if (useGenericButton) { [button setDefaultImage:GetImageFromResourceID( - IDR_AVATAR_MAC_BUTTON_AVATAR)]; + IDR_AVATAR_NATIVE_BUTTON_AVATAR)]; [button setHoverImage:GetImageFromResourceID( - IDR_AVATAR_MAC_BUTTON_AVATAR_HOVER)]; + IDR_AVATAR_NATIVE_BUTTON_AVATAR_HOVER)]; [button setPressedImage:GetImageFromResourceID( - IDR_AVATAR_MAC_BUTTON_AVATAR_PRESSED)]; + IDR_AVATAR_NATIVE_BUTTON_AVATAR_PRESSED)]; // This is a workaround for an issue in the HoverImageButton where the // button is initially sized incorrectly unless a default image is provided. // See crbug.com/298501. - [button setImage:GetImageFromResourceID(IDR_AVATAR_MAC_BUTTON_AVATAR)]; + [button setImage:GetImageFromResourceID(IDR_AVATAR_NATIVE_BUTTON_AVATAR)]; [button setImagePosition:NSImageOnly]; } else if (hasError_) { [button setDefaultImage:GetImageFromResourceID( diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.cc b/chrome/browser/ui/views/profiles/new_avatar_button.cc index 64dd9b8..5595166 100644 --- a/chrome/browser/ui/views/profiles/new_avatar_button.cc +++ b/chrome/browser/ui/views/profiles/new_avatar_button.cc @@ -81,24 +81,23 @@ NewAvatarButton::NewAvatarButton(views::ButtonListener* listener, generic_avatar_ = *rb->GetImageNamed(IDR_AVATAR_THEMED_BUTTON_AVATAR).ToImageSkia(); #if defined(OS_WIN) - } else if (base::win::GetVersion() >= base::win::VERSION_WIN8 || - browser->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) { - const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_METRO_BUTTON_NORMAL); - const int kHotImageSet[] = IMAGE_GRID(IDR_AVATAR_METRO_BUTTON_HOVER); - const int kPushedImageSet[] = IMAGE_GRID(IDR_AVATAR_METRO_BUTTON_PRESSED); + } else if (base::win::GetVersion() < base::win::VERSION_WIN8) { + const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_NORMAL); + const int kHotImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_HOVER); + const int kPushedImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_PRESSED); SetBorder(CreateBorder(kNormalImageSet, kHotImageSet, kPushedImageSet)); generic_avatar_ = - *rb->GetImageNamed(IDR_AVATAR_METRO_BUTTON_AVATAR).ToImageSkia(); + *rb->GetImageNamed(IDR_AVATAR_GLASS_BUTTON_AVATAR).ToImageSkia(); #endif } else { - const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_NORMAL); - const int kHotImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_HOVER); - const int kPushedImageSet[] = IMAGE_GRID(IDR_AVATAR_GLASS_BUTTON_PRESSED); + const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_NORMAL); + const int kHotImageSet[] = IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_HOVER); + const int kPushedImageSet[] = IMAGE_GRID(IDR_AVATAR_NATIVE_BUTTON_PRESSED); SetBorder(CreateBorder(kNormalImageSet, kHotImageSet, kPushedImageSet)); generic_avatar_ = - *rb->GetImageNamed(IDR_AVATAR_GLASS_BUTTON_AVATAR).ToImageSkia(); + *rb->GetImageNamed(IDR_AVATAR_NATIVE_BUTTON_AVATAR).ToImageSkia(); } g_browser_process->profile_manager()->GetProfileInfoCache().AddObserver(this); |