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

Unified Diff: chrome/browser/ui/cocoa/extensions/browser_action_button.mm

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/cocoa/extensions/browser_action_button.mm
diff --git a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
index 836262e29e40de268c864284bdf705cf2ab775c4..f90ae1def896b97ad7e4219e87fc1a917adda3f6 100644
--- a/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
+++ b/chrome/browser/ui/cocoa/extensions/browser_action_button.mm
@@ -22,6 +22,7 @@
#include "skia/ext/skia_utils_mac.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
#include "ui/gfx/canvas_skia_paint.h"
+#include "ui/gfx/image/image.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h"
#include "ui/gfx/size.h"
@@ -66,10 +67,11 @@ class ExtensionImageTrackerBridge : public content::NotificationObserver,
~ExtensionImageTrackerBridge() {}
// ImageLoadingTracker::Observer implementation.
- void OnImageLoaded(SkBitmap* image, const ExtensionResource& resource,
- int index) {
- if (image)
- [owner_ setDefaultIcon:gfx::SkBitmapToNSImage(*image)];
+ void OnImageLoaded(const gfx::Image& image,
+ const std::string& extension_id,
+ int index) OVERRIDE {
+ if (!image.IsEmpty())
+ [owner_ setDefaultIcon:image.ToNSImage()];
[owner_ updateState];
}
« no previous file with comments | « chrome/browser/shell_integration_linux.cc ('k') | chrome/browser/ui/cocoa/infobars/extension_infobar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698