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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_model.cc

Issue 2973006: Use the extension icon for extension omnibox results instead of the generic (Closed)
Patch Set: fixed mac Created 10 years, 5 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/autocomplete/autocomplete_popup_model.cc
diff --git a/chrome/browser/autocomplete/autocomplete_popup_model.cc b/chrome/browser/autocomplete/autocomplete_popup_model.cc
index 009cc0b3859a2c36180542b2593e4a28156073b8..f4f7a82915ee9fd83fd1f551b99f68d5957b2f03 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_model.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_model.cc
@@ -8,6 +8,7 @@
#include "chrome/browser/autocomplete/autocomplete_edit.h"
#include "chrome/browser/autocomplete/autocomplete_popup_view.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/extensions/extensions_service.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/common/notification_service.h"
@@ -279,3 +280,12 @@ void AutocompletePopupModel::Observe(NotificationType type,
view_->UpdatePopupAppearance();
}
+
+const SkBitmap* AutocompletePopupModel::GetSpecialIconForMatch(
+ const AutocompleteMatch& match) const {
+ if (!match.template_url || !match.template_url->IsExtensionKeyword())
+ return NULL;
+
+ return &profile_->GetExtensionsService()->GetOmniboxIcon(
+ match.template_url->GetExtensionId());
+}
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_model.h ('k') | chrome/browser/autocomplete/autocomplete_popup_view_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698