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

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: update 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
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..abea7b5947421504b1f61752d625af770b2dc500 100644
--- a/components/omnibox/browser/omnibox_view.cc
+++ b/components/omnibox/browser/omnibox_view.cc
@@ -81,10 +81,23 @@ 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)
+ return id;
+
+ switch (id) {
+ case gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID:
+ return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_INVERT;
+ case gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID:
+ return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID_INVERT;
+
+ default:
+ return id;
+ }
Peter Kasting 2015/11/17 21:27:03 Nit: Shorter: gfx::VectorIconId id = controll
+ }
// Reuse the dropdown icons...
gfx::VectorIconId id = AutocompleteMatch::TypeToVectorIcon(
model_ ? model_->CurrentTextType()

Powered by Google App Engine
This is Rietveld 408576698