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

Side by Side Diff: components/omnibox/browser/omnibox_view.cc

Issue 1935663002: New origin security indicator icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make invalid_invert white instead of red in white round-rect. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines helper functions shared by the various implementations 5 // This file defines helper functions shared by the various implementations
6 // of OmniboxView. 6 // of OmniboxView.
7 7
8 #include "components/omnibox/browser/omnibox_view.h" 8 #include "components/omnibox/browser/omnibox_view.h"
9 9
10 #include <utility> 10 #include <utility>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_INVERT; 95 return gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_INVERT;
96 if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID) 96 if (id == gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID)
97 return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID_INVERT; 97 return gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID_INVERT;
98 } 98 }
99 return id; 99 return id;
100 } 100 }
101 // Reuse the dropdown icons... 101 // Reuse the dropdown icons...
102 gfx::VectorIconId id = AutocompleteMatch::TypeToVectorIcon( 102 gfx::VectorIconId id = AutocompleteMatch::TypeToVectorIcon(
103 model_ ? model_->CurrentTextType() 103 model_ ? model_->CurrentTextType()
104 : AutocompleteMatchType::URL_WHAT_YOU_TYPED); 104 : AutocompleteMatchType::URL_WHAT_YOU_TYPED);
105 // but use a tweaked version for the HTTP icon. 105 // but use a different version for the HTTP icon.
106 return (id == gfx::VectorIconId::OMNIBOX_HTTP) 106 return (id == gfx::VectorIconId::OMNIBOX_HTTP)
107 ? gfx::VectorIconId::LOCATION_BAR_HTTP 107 ? gfx::VectorIconId::LOCATION_BAR_HTTP
108 : id; 108 : id;
109 #else 109 #else
110 NOTIMPLEMENTED(); 110 NOTIMPLEMENTED();
111 return gfx::VectorIconId::VECTOR_ICON_NONE; 111 return gfx::VectorIconId::VECTOR_ICON_NONE;
112 #endif 112 #endif
113 } 113 }
114 114
115 void OmniboxView::SetUserText(const base::string16& text) { 115 void OmniboxView::SetUserText(const base::string16& text) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 if (client) { 182 if (client) {
183 model_.reset(new OmniboxEditModel(this, controller, std::move(client))); 183 model_.reset(new OmniboxEditModel(this, controller, std::move(client)));
184 } 184 }
185 } 185 }
186 186
187 void OmniboxView::TextChanged() { 187 void OmniboxView::TextChanged() {
188 EmphasizeURLComponents(); 188 EmphasizeURLComponents();
189 if (model_.get()) 189 if (model_.get())
190 model_->OnChanged(); 190 model_->OnChanged();
191 } 191 }
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/vector_icons/location_bar_http.icon » ('j') | ui/gfx/vector_icons/location_bar_https_invalid.icon » ('J')

Powered by Google App Engine
This is Rietveld 408576698