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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1935663002: New origin security indicator icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor to not have distinct _invert .icons, per estade. Created 4 years, 7 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/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 6b4235d1f1b8bcacf45da01c17582ccdf9de49a4..501ff9ce24e8f325c1c2584f940de20813f14698 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -365,6 +365,10 @@ SkColor LocationBarView::GetSecureTextColor(
return GetColor(TEXT);
break;
+ case security_state::SecurityStateModel::NONE:
Peter Kasting 2016/05/11 18:53:21 Nit: Combine with the SECURITY_WARNING case
palmer 2016/05/12 21:23:14 Done.
+ return GetColor(TEXT);
+ break;
+
default:
NOTREACHED();
return gfx::kPlaceholderColor;
@@ -869,9 +873,9 @@ void LocationBarView::RefreshLocationIcon() {
icon_id = gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_IN_CHIP;
icon_color = location_icon_view_->GetTextColor();
} else {
- icon_id = omnibox_view_->GetVectorIcon(
- color_utils::IsDark(GetColor(BACKGROUND)));
- icon_color = color_utils::DeriveDefaultIconColor(GetColor(TEXT));
+ icon_id = omnibox_view_->GetVectorIcon();
+ icon_color = color_utils::DeriveDefaultIconColor(
+ GetSecureTextColor(GetToolbarModel()->GetSecurityLevel(false)));
}
location_icon_view_->SetImage(
gfx::CreateVectorIcon(icon_id, kIconSize, icon_color));
« no previous file with comments | « no previous file | components/omnibox/browser/omnibox_view.h » ('j') | ui/gfx/vector_icons/location_bar_http.icon » ('J')

Powered by Google App Engine
This is Rietveld 408576698