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

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

Issue 2399333002: Revert of Delete pre-MD code from OmniboxResultView (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/omnibox/browser/omnibox_view.h ('k') | components/resources/components_scaled_resources.grd » ('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 a09b95436e3f1311519e50db03b7bdf84862e8d4..d471fb120c2192eecd663ff6b495518e85dfa034 100644
--- a/components/omnibox/browser/omnibox_view.cc
+++ b/components/omnibox/browser/omnibox_view.cc
@@ -79,13 +79,26 @@
(GetOmniboxTextLength() == 0);
}
+int OmniboxView::GetIcon() const {
+ if (!IsEditingOrEmpty())
+ return controller_->GetToolbarModel()->GetIcon();
+ int id = AutocompleteMatch::TypeToIcon(model_.get() ?
+ model_->CurrentTextType() : AutocompleteMatchType::URL_WHAT_YOU_TYPED);
+ return (id == IDR_OMNIBOX_HTTP) ? IDR_LOCATION_BAR_HTTP : id;
+}
+
gfx::VectorIconId OmniboxView::GetVectorIcon() const {
+#if !defined(OS_ANDROID) && !defined(OS_IOS)
if (!IsEditingOrEmpty())
return controller_->GetToolbarModel()->GetVectorIcon();
return AutocompleteMatch::TypeToVectorIcon(
model_ ? model_->CurrentTextType()
: AutocompleteMatchType::URL_WHAT_YOU_TYPED);
+#else
+ NOTIMPLEMENTED();
+ return gfx::VectorIconId::VECTOR_ICON_NONE;
+#endif
}
void OmniboxView::SetUserText(const base::string16& text) {
« no previous file with comments | « components/omnibox/browser/omnibox_view.h ('k') | components/resources/components_scaled_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698