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

Unified Diff: chrome/browser/ui/panels/panel_titlebar_gtk.cc

Issue 10827259: Change panels to use gfx::Image instead of SkBitmap for favicon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: applied change to panel_titlebar_gtk.cc after syncing 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/panels/panel_host.cc ('k') | chrome/browser/ui/panels/panel_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_titlebar_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_titlebar_gtk.cc b/chrome/browser/ui/panels/panel_titlebar_gtk.cc
index e15f9c6762887393d3177e36efa99b278157996c..8dde42f08115d13931d8aef9ed03a964c784f806 100644
--- a/chrome/browser/ui/panels/panel_titlebar_gtk.cc
+++ b/chrome/browser/ui/panels/panel_titlebar_gtk.cc
@@ -13,10 +13,10 @@
#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/gtk/gtk_compat.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/skia_utils_gtk.h"
namespace {
@@ -216,15 +216,13 @@ void PanelTitlebarGtk::UpdateThrobber(
} else {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SkBitmap icon = panel_gtk_->panel()->GetCurrentPageIcon();
- if (icon.empty()) {
+ gfx::Image icon = panel_gtk_->panel()->GetCurrentPageIcon();
+ if (icon.IsEmpty()) {
// Fallback to the Chromium icon if the page has no icon.
gtk_image_set_from_pixbuf(GTK_IMAGE(icon_),
rb.GetNativeImageNamed(IDR_PRODUCT_LOGO_16).ToGdkPixbuf());
} else {
- GdkPixbuf* icon_pixbuf = gfx::GdkPixbufFromSkBitmap(icon);
- gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), icon_pixbuf);
- g_object_unref(icon_pixbuf);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), icon.ToGdkPixbuf());
}
throbber_.Reset();
« no previous file with comments | « chrome/browser/ui/panels/panel_host.cc ('k') | chrome/browser/ui/panels/panel_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698