Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm

Issue 1821823004: [Mac][Material Design] Update Omnibox dropdown on Mac to MD (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up for review. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
index 86b9b9716fdea15fb187d3d0d1e294a34d0305f8..4dadab7703161fd5b7c661de7f22892c4147b1fe 100644
--- a/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/manage_passwords_decoration.mm
@@ -90,20 +90,18 @@ void ManagePasswordsDecoration::UpdateUIState() {
SetVisible(true);
if (!ui::MaterialDesignController::IsModeMaterial()) {
SetImage(OmniboxViewMac::ImageForResource(icon_->icon_id()));
- } else {
- int resource_id = icon_->icon_id();
- bool locationBarIsDark =
- [[location_bar_->GetAutocompleteTextField() window]
- inIncognitoModeWithSystemTheme];
- SkColor vectorIconColor = gfx::kGoogleBlue700;
- if (resource_id != IDR_SAVE_PASSWORD_ACTIVE) {
- vectorIconColor = locationBarIsDark ? SK_ColorWHITE
- : gfx::kChromeIconGrey;
- }
- NSImage* theImage = NSImageFromImageSkia(gfx::CreateVectorIcon(
- gfx::VectorIconId::AUTOLOGIN, 16, vectorIconColor));
- SetImage(theImage);
+ return;
}
+ bool location_bar_is_dark =
+ [[location_bar_->GetAutocompleteTextField() window]
+ inIncognitoModeWithSystemTheme];
+ SkColor vector_icon_color =
+ location_bar_is_dark ? SkColorSetA(SK_ColorWHITE, 0xCC)
+ : gfx::kChromeIconGrey;
+ const int kIconSize = 16;
+ NSImage* the_image = NSImageFromImageSkia(gfx::CreateVectorIcon(
tapted 2016/04/28 14:29:43 did we want sRGB for this?
shrike 2016/04/28 21:05:35 I think no for now. That's because this icon appea
+ gfx::VectorIconId::AUTOLOGIN, kIconSize, vector_icon_color));
+ SetImage(the_image);
}
void ManagePasswordsDecoration::UpdateVisibleUI() {

Powered by Google App Engine
This is Rietveld 408576698