Chromium Code Reviews| 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 bdea0570ee786d90b7b08723dc3567906bbfb1b3..40f9352c1b9fb48ea5f6a5aac05c6037afe62f21 100644 |
| --- a/chrome/browser/web_applications/web_app_mac.mm |
| +++ b/chrome/browser/web_applications/web_app_mac.mm |
| @@ -24,7 +24,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" |
| +#include "ui/gfx/image/image_family.h" |
| namespace { |
| @@ -211,17 +211,17 @@ bool WebAppShortcutCreator::UpdatePlist(const base::FilePath& app_path) const { |
| } |
| bool WebAppShortcutCreator::UpdateIcon(const base::FilePath& app_path) const { |
| - if (info_.favicon.IsEmpty()) |
| + if (info_.favicon.empty()) |
| return true; |
| scoped_nsobject<IconFamily> icon_family([[IconFamily alloc] init]); |
| bool image_added = false; |
| - info_.favicon.ToImageSkia()->EnsureRepsForSupportedScaleFactors(); |
| - std::vector<gfx::ImageSkiaRep> image_reps = |
| - info_.favicon.ToImageSkia()->image_reps(); |
| - for (size_t i = 0; i < image_reps.size(); ++i) { |
| - NSBitmapImageRep* image_rep = SkBitmapToImageRep( |
| - image_reps[i].sk_bitmap()); |
| + for (gfx::ImageFamily::const_iterator it = info_.favicon.begin(); |
| + it != info_.favicon.end(); ++it) { |
| + it->EnsureRepsForSupportedScaleFactors(); |
|
pkotwicz
2013/04/04 18:34:40
EnsureRepsForSupportedScaleFactors() is not necess
Matt Giuca
2013/04/05 06:30:13
:O I thought I removed this.
|
| + if (it->IsEmpty()) |
| + continue; |
| + NSBitmapImageRep* image_rep = SkBitmapToImageRep(*it->ToSkBitmap()); |
|
Robert Sesek
2013/04/04 18:39:02
ToNSImage and get the bitmap reps via the NSImage
Matt Giuca
2013/04/05 06:30:13
Done. But note that SkBitmapToImageRep called SkBi
|
| if (!image_rep) |
| continue; |