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

Unified Diff: chrome/browser/ui/gtk/location_bar_view_gtk.cc

Issue 10834368: Convert mostly favicon related code from SkBitmap to ImageSkia and Image (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | chrome/browser/ui/omnibox/omnibox_edit_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/location_bar_view_gtk.cc
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index 272c6f6cf2a08777c924d779e2150171c3539293..ac49be9eae2479fc0fe93ae5f9ec82864d58055d 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -816,8 +816,8 @@ void LocationBarViewGtk::OnSetFocus() {
OnChanged();
}
-SkBitmap LocationBarViewGtk::GetFavicon() const {
- return GetTabContents()->favicon_tab_helper()->GetFavicon().AsBitmap();
+gfx::Image LocationBarViewGtk::GetFavicon() const {
+ return GetTabContents()->favicon_tab_helper()->GetFavicon();
}
string16 LocationBarViewGtk::GetTitle() const {
@@ -1349,13 +1349,11 @@ void LocationBarViewGtk::OnIconDragData(GtkWidget* sender,
void LocationBarViewGtk::OnIconDragBegin(GtkWidget* sender,
GdkDragContext* context) {
- SkBitmap favicon = GetFavicon();
- GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(favicon);
- if (!pixbuf)
+ gfx::Image favicon = GetFavicon();
+ if (favicon.IsEmpty())
return;
- drag_icon_ = bookmark_utils::GetDragRepresentation(pixbuf,
+ drag_icon_ = bookmark_utils::GetDragRepresentation(favicon.ToGdkPixbuf(),
GetTitle(), theme_service_);
- g_object_unref(pixbuf);
gtk_drag_set_icon_widget(context, drag_icon_, 0, 0);
WebContents* tab = GetWebContents();
« no previous file with comments | « chrome/browser/ui/gtk/location_bar_view_gtk.h ('k') | chrome/browser/ui/omnibox/omnibox_edit_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698