Chromium Code Reviews| 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 3c4ed91064ea7b7116f4a0fa282c15f1362e9d5f..c0cfe5ea51946f9dab37b7f66b7762404e44bfee 100644 |
| --- a/chrome/browser/ui/views/omnibox/omnibox_result_view.cc |
| +++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.cc |
| @@ -356,7 +356,7 @@ void OmniboxResultView::PaintMatch(const AutocompleteMatch& match, |
| 0, 0, answer_image_.width(), answer_image_.height(), |
| GetMirroredXInView(x), y, answer_icon_size, answer_icon_size, true); |
| x += answer_icon_size + |
| - GetThemeProvider()->GetDisplayProperty( |
| + location_bar_view_->GetThemeProvider()->GetDisplayProperty( |
|
Peter Kasting
2015/07/31 20:37:59
Might want some sort of a "See TODO in Layout()" c
jonross
2015/08/04 21:58:10
Done.
|
| ThemeProperties::PROPERTY_ICON_LABEL_VIEW_TRAILING_PADDING); |
| } |
| } else { |
| @@ -608,7 +608,12 @@ void OmniboxResultView::InitContentsRenderTextIfNecessary() const { |
| void OmniboxResultView::Layout() { |
| const gfx::ImageSkia icon = GetIcon(); |
| - ui::ThemeProvider* theme_provider = GetThemeProvider(); |
| + // TODO(jonross): Currently |location_bar_view_| provides the correct |
| + // ThemeProvider, as it is loaded on the BrowserFrame widget. The root widget |
| + // for OmniboxResultView is AutocompletePopupWidget, which is not loading the |
| + // theme. We should update the omnibox code to also track its own |
| + // ThemeProvider in order to reduce dependancy on LocationBarView. |
| + ui::ThemeProvider* theme_provider = location_bar_view_->GetThemeProvider(); |
| // |theme_provider| can be null when animations are running during shutdown, |
| // after OmniboxResultView has been removed from the tree of Views. |
| if (!theme_provider) |