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

Unified Diff: chrome/browser/ui/panels/panel_browser_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: compile fix 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
Index: chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
index c3c3fd0792dedd65ed66352cc4250059d36fc117..c4e877f043bd440fdafbff156832cf232180a666 100644
--- a/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_titlebar_gtk.cc
@@ -17,10 +17,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 {
@@ -235,13 +235,13 @@ void PanelBrowserTitlebarGtk::UpdateThrobber(
} else {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- SkBitmap icon = browser_window_->panel()->GetCurrentPageIcon();
- if (icon.empty()) {
+ gfx::Image icon = browser_window_->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);
+ GdkPixbuf* icon_pixbuf = icon.ToGdkPixbuf();
gtk_image_set_from_pixbuf(GTK_IMAGE(icon_), icon_pixbuf);
g_object_unref(icon_pixbuf);
Robert Sesek 2012/08/10 19:37:29 The ToX functions return a weak reference, so this
jennb 2012/08/11 04:20:05 Thanks for pointing this out. Maybe this explains
}

Powered by Google App Engine
This is Rietveld 408576698