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

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

Issue 2375033002: cocoa browser: remove non-MD location bar support (Closed)
Patch Set: fix nits Created 4 years, 3 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/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 57617956f779157aad22ac1e6f3937667efa950e..15b7d2f314b38e055ccc45acbe2e7ef9105cd152 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -633,11 +633,6 @@ new ManagePasswordsDecoration(command_updater, this)),
}
void LocationBarViewMac::UpdateColorsToMatchTheme() {
- if (!ui::MaterialDesignController::IsModeMaterial() ||
- ![[field_ window] inIncognitoMode]) {
- return;
- }
-
// Update the location-bar icon.
UpdateLocationIcon();
@@ -660,14 +655,6 @@ new ManagePasswordsDecoration(command_updater, this)),
}
void LocationBarViewMac::OnChanged() {
- if (!ui::MaterialDesignController::IsModeMaterial()) {
- const int resource_id = omnibox_view_->GetIcon();
- NSImage* image = OmniboxViewMac::ImageForResource(resource_id);
- location_icon_decoration_->SetImage(image);
- security_state_bubble_decoration_->SetImage(image);
- Layout();
- return;
- }
UpdateSecurityState(false);
UpdateLocationIcon();
}
@@ -697,8 +684,7 @@ new ManagePasswordsDecoration(command_updater, this)),
security == security_state::SecurityStateModel::DANGEROUS ||
(IsSecureConnection(security) && should_show_secure_verbose_);
- return ui::MaterialDesignController::IsModeMaterial() &&
- has_verbose_for_security && !omnibox_view_->IsEditingOrEmpty() &&
+ return has_verbose_for_security && !omnibox_view_->IsEditingOrEmpty() &&
!omnibox_view_->model()->is_keyword_hint();
}
@@ -715,16 +701,12 @@ new ManagePasswordsDecoration(command_updater, this)),
GetOmniboxIcon(template_url->GetExtensionId()).AsNSImage();
}
- if (ui::MaterialDesignController::IsModeMaterial()) {
- SkColor icon_color = IsLocationBarDark() ? kMaterialDarkVectorIconColor
- : gfx::kGoogleBlue700;
- return NSImageFromImageSkiaWithColorSpace(
- gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH,
- kDefaultIconSize, icon_color),
- base::mac::GetSRGBColorSpace());
- }
-
- return OmniboxViewMac::ImageForResource(IDR_OMNIBOX_SEARCH);
+ SkColor icon_color =
+ IsLocationBarDark() ? kMaterialDarkVectorIconColor : gfx::kGoogleBlue700;
+ return NSImageFromImageSkiaWithColorSpace(
+ gfx::CreateVectorIcon(gfx::VectorIconId::OMNIBOX_SEARCH, kDefaultIconSize,
+ icon_color),
+ base::mac::GetSRGBColorSpace());
}
SkColor LocationBarViewMac::GetLocationBarIconColor() const {

Powered by Google App Engine
This is Rietveld 408576698