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

Unified Diff: components/omnibox/browser/omnibox_view.cc

Issue 1448433004: [MD] update EV bubble icon and location bar https icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build.gn Created 5 years, 1 month 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
« no previous file with comments | « components/omnibox/browser/omnibox_view.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/omnibox_view.cc
diff --git a/components/omnibox/browser/omnibox_view.cc b/components/omnibox/browser/omnibox_view.cc
index 9a10d6b0e7105d5617c4571c6a23895e278453fd..d070f0a750a3aa256c6cfc98bb5676ec12acf563 100644
--- a/components/omnibox/browser/omnibox_view.cc
+++ b/components/omnibox/browser/omnibox_view.cc
@@ -81,10 +81,18 @@ int OmniboxView::GetIcon() const {
return (id == IDR_OMNIBOX_HTTP) ? IDR_LOCATION_BAR_HTTP : id;
}
-gfx::VectorIconId OmniboxView::GetVectorIcon() const {
+gfx::VectorIconId OmniboxView::GetVectorIcon(bool invert) const {
#if !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS)
- if (!IsEditingOrEmpty())
- return controller_->GetToolbarModel()->GetVectorIcon();
+ if (!IsEditingOrEmpty()) {
+ gfx::VectorIconId id = controller_->GetToolbarModel()->GetVectorIcon();
+ if (invert) {
+ if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID)
+ return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_INVERT;
+ if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID)
+ return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID_INVERT;
+ }
+ return id;
+ }
// Reuse the dropdown icons...
gfx::VectorIconId id = AutocompleteMatch::TypeToVectorIcon(
model_ ? model_->CurrentTextType()
« no previous file with comments | « components/omnibox/browser/omnibox_view.h ('k') | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698