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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.cc

Issue 15745031: Restyle omnibox popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Go back to 3 max search suggestions for now Created 7 years, 6 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
Index: chrome/browser/ui/views/omnibox/omnibox_result_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
index c044521d25ed7e9228a6c0162f6dd21184710d3f..d76fe0bdc542acfd0d766a70ee3c01a702d0fa43 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc
@@ -106,14 +106,14 @@ class OmniboxResultView::MirroringContext {
OmniboxResultView::OmniboxResultView(
OmniboxResultViewModel* model,
int model_index,
- views::View* location_bar,
+ OmniboxViewDelegate* view_delegate,
const gfx::Font& font)
: edge_item_padding_(LocationBarView::GetItemPadding()),
item_padding_(LocationBarView::GetItemPadding()),
minimum_text_vertical_padding_(kMinimumTextVerticalPadding),
model_(model),
model_index_(model_index),
- location_bar_(location_bar),
+ view_delegate_(view_delegate),
font_(font),
font_height_(std::max(font.GetHeight(),
font.DeriveFont(0, gfx::BOLD).GetHeight())),
@@ -124,7 +124,7 @@ OmniboxResultView::OmniboxResultView(
CHECK_GE(model_index, 0);
if (default_icon_size_ == 0) {
default_icon_size_ =
- location_bar_->GetThemeProvider()->GetImageSkiaNamed(
+ view_delegate_->GetThemeProviderForPopup()->GetImageSkiaNamed(
AutocompleteMatch::TypeToIcon(
AutocompleteMatchType::URL_WHAT_YOU_TYPED))->width();
}
@@ -325,13 +325,13 @@ gfx::ImageSkia OmniboxResultView::GetIcon() const {
break;
}
}
- return *(location_bar_->GetThemeProvider()->GetImageSkiaNamed(icon));
+ return *(view_delegate_->GetThemeProviderForPopup()->GetImageSkiaNamed(icon));
}
const gfx::ImageSkia* OmniboxResultView::GetKeywordIcon() const {
// NOTE: If we ever begin returning icons of varying size, then callers need
// to ensure that |keyword_icon_| is resized each time its image is reset.
- return location_bar_->GetThemeProvider()->GetImageSkiaNamed(
+ return view_delegate_->GetThemeProviderForPopup()->GetImageSkiaNamed(
(GetState() == SELECTED) ? IDR_OMNIBOX_TTS_SELECTED : IDR_OMNIBOX_TTS);
}

Powered by Google App Engine
This is Rietveld 408576698