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

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: Address feedback. 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..7a6c9256af5711037cdf5988adf276dfb152b88e 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,12 @@ 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];
+ SetImage(GetMaterialIcon(location_bar_is_dark));
}
void ManagePasswordsDecoration::UpdateVisibleUI() {
@@ -115,3 +107,7 @@ void ManagePasswordsDecoration::HideBubble() {
if (icon()->active() && ManagePasswordsBubbleCocoa::instance())
ManagePasswordsBubbleCocoa::instance()->Close();
}
+
+gfx::VectorIconId ManagePasswordsDecoration::GetMaterialVectorIconId() {
+ return gfx::VectorIconId::AUTOLOGIN;
+}

Powered by Google App Engine
This is Rietveld 408576698