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

Unified Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 10086023: Expose array of bitmaps contained by gfx::Image similar to NSImage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as requested Created 8 years, 8 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/web_applications/web_app_mac.mm
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index e5a5ea4cb637f5cc5953df175dae2c4f09d8f87f..baf8550043ee7bba19405c7be9b8bdbbac37e258 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -22,6 +22,7 @@
#include "skia/ext/skia_utils_mac.h"
#include "third_party/icon_family/IconFamily.h"
#include "ui/base/l10n/l10n_util_mac.h"
+#include "ui/gfx/image/image_skia.h"
namespace {
@@ -197,9 +198,11 @@ bool WebAppShortcutCreator::UpdateIcon(const FilePath& app_path) const {
scoped_nsobject<IconFamily> icon_family([[IconFamily alloc] init]);
bool image_added = false;
- for (size_t i = 0; i < info_.favicon.GetNumberOfSkBitmaps(); ++i) {
+ const std::vector<const SkBitmap*>& bitmaps =
+ info_.favicon.ToImageSkia()->bitmaps();
+ for (size_t i = 0; i < bitmaps.size(); ++i) {
NSBitmapImageRep* image_rep =
- SkBitmapToImageRep(*info_.favicon.GetSkBitmapAtIndex(i));
+ SkBitmapToImageRep(*bitmaps[i]);
Robert Sesek 2012/04/20 16:33:14 nit: can you join this with the nxt line?
if (!image_rep)
continue;

Powered by Google App Engine
This is Rietveld 408576698