| Index: chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
|
| diff --git a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
|
| index 17d243cd0706c54322cbaf4bd28e710a6bf132dc..45a10bf3b7c8fd68211bedf3770c35adbf066b04 100644
|
| --- a/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
|
| +++ b/chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc
|
| @@ -153,7 +153,7 @@ class AutocompleteResultView : public views::View {
|
|
|
| ResultViewState GetState() const;
|
|
|
| - SkBitmap* GetIcon() const;
|
| + const SkBitmap* GetIcon() const;
|
|
|
| // Draws the specified |text| into the canvas, using highlighting provided by
|
| // |classifications|. If |force_dim| is true, ACMatchClassification::DIM is
|
| @@ -339,7 +339,11 @@ ResultViewState AutocompleteResultView::GetState() const {
|
| return model_->IsHoveredIndex(model_index_) ? HOVERED : NORMAL;
|
| }
|
|
|
| -SkBitmap* AutocompleteResultView::GetIcon() const {
|
| +const SkBitmap* AutocompleteResultView::GetIcon() const {
|
| + const SkBitmap* bitmap = model_->GetSpecialIcon(model_index_);
|
| + if (bitmap)
|
| + return bitmap;
|
| +
|
| int icon = match_.starred ?
|
| IDR_OMNIBOX_STAR : AutocompleteMatch::TypeToIcon(match_.type);
|
| if (model_->IsSelectedIndex(model_index_)) {
|
| @@ -740,6 +744,13 @@ bool AutocompletePopupContentsView::IsHoveredIndex(size_t index) const {
|
| return HasMatchAt(index) ? index == model_->hovered_line() : false;
|
| }
|
|
|
| +const SkBitmap* AutocompletePopupContentsView::GetSpecialIcon(
|
| + size_t index) const {
|
| + if (!HasMatchAt(index))
|
| + return NULL;
|
| + return model_->GetSpecialIconForMatch(GetMatchAtIndex(index));
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // AutocompletePopupContentsView, AnimationDelegate implementation:
|
|
|
|
|