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() |