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

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

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 10 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/gtk/browser_actions_toolbar_gtk.cc
diff --git a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
index 31548aae7ca1eb6139999ea8f2cdded4c9386720..3c8f616352a943eabeade9f4c6e5e29292e940bb 100644
--- a/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_actions_toolbar_gtk.cc
@@ -39,6 +39,7 @@
#include "ui/base/gtk/gtk_compat.h"
#include "ui/gfx/canvas_skia_paint.h"
#include "ui/gfx/gtk_util.h"
+#include "ui/gfx/image/image.h"
namespace {
@@ -160,11 +161,13 @@ class BrowserActionButton : public content::NotificationObserver,
}
// ImageLoadingTracker::Observer implementation.
- void OnImageLoaded(SkBitmap* image, const ExtensionResource& resource,
- int index) {
- if (image) {
- default_skbitmap_ = *image;
- default_icon_ = gfx::GdkPixbufFromSkBitmap(image);
+ void OnImageLoaded(const gfx::Image& image,
+ const std::string& extension_id,
+ int index) OVERRIDE {
+ if (!image.IsEmpty()) {
+ default_skbitmap_ = *image.ToSkBitmap();
+ default_icon_ =
+ static_cast<GdkPixbuf*>(g_object_ref(image.ToGdkPixbuf()));
}
UpdateState();
}

Powered by Google App Engine
This is Rietveld 408576698