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

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: Nicer diff 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
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bcc7991e1a58ca84d51bb5334f0560cee095a6cb 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,10 @@ 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) {
- NSBitmapImageRep* image_rep =
- SkBitmapToImageRep(*info_.favicon.GetSkBitmapAtIndex(i));
+ const std::vector<const SkBitmap*>& bitmaps =
+ info_.favicon.ToImageSkia()->bitmaps();
+ for (size_t i = 0; i < bitmaps.size(); ++i) {
+ NSBitmapImageRep* image_rep = SkBitmapToImageRep(*bitmaps[i]);
if (!image_rep)
continue;
« no previous file with comments | « chrome/browser/themes/browser_theme_pack.cc ('k') | ui/gfx/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698