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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_gtk.h

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_view_gtk.h
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
index 4759417b5e8425ac6f70f6606c60e5290e296d8e..29424894217b62067931b6a257c94884a7ab3f11 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_POPUP_VIEW_GTK_H_
#include <gtk/gtk.h>
+#include <map>
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
@@ -16,6 +17,7 @@
class AutocompleteEditModel;
class AutocompleteEditView;
+class AutocompleteMatch;
class AutocompletePopupModel;
class GtkThemeProvider;
class Profile;
@@ -56,6 +58,8 @@ class AutocompletePopupViewGtk : public AutocompletePopupView,
// Accept a line of the results, for example, when the user clicks a line.
void AcceptLine(size_t line, WindowOpenDisposition disposition);
+ GdkPixbuf* IconForMatch(const AutocompleteMatch& match, bool selected);
+
static gboolean HandleExposeThunk(GtkWidget* widget, GdkEventExpose* event,
gpointer userdata) {
return reinterpret_cast<AutocompletePopupViewGtk*>(userdata)->
@@ -99,6 +103,11 @@ class AutocompletePopupViewGtk : public AutocompletePopupView,
GtkThemeProvider* theme_provider_;
NotificationRegistrar registrar_;
+ // Used to cache GdkPixbufs and map them from the SkBitmaps they were created
+ // from.
+ typedef std::map<const SkBitmap*, GdkPixbuf*> PixbufMap;
+ PixbufMap pixbufs_;
+
// A list of colors which we should use for drawing the popup. These change
// between gtk and normal mode.
GdkColor border_color_;
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_popup_model.cc ('k') | chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698