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

Unified Diff: chrome/browser/themes/theme_service_mac.mm

Issue 6849030: Add support for multi resolution icons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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/themes/theme_service_mac.mm
diff --git a/chrome/browser/themes/theme_service_mac.mm b/chrome/browser/themes/theme_service_mac.mm
index 30d359ee203040d8f36aca70ad7887d964e97253..cf9ad9926e7860da85d69054db1ee6e27199694e 100644
--- a/chrome/browser/themes/theme_service_mac.mm
+++ b/chrome/browser/themes/theme_service_mac.mm
@@ -44,13 +44,15 @@ NSImage* ThemeService::GetNSImageNamed(int id, bool allow_default) const {
// SkBitmap > native conversion?
// - For consistency with other platforms.
// - To get the generated tinted images.
- SkBitmap* bitmap = GetBitmapNamed(id);
- NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap);
-
- // We loaded successfully. Cache the image.
- if (nsimage) {
- nsimage_cache_[id] = [nsimage retain];
- return nsimage;
+ std::vector<SkBitmap*> bitmaps;
+ if (GetBitmapsNamed(id, bitmaps)) {
+ NSImage* nsimage = gfx::SkBitmapsToNSImage(bitmaps);
+
+ // We loaded successfully. Cache the image.
+ if (nsimage) {
+ nsimage_cache_[id] = [nsimage retain];
+ return nsimage;
+ }
}
// We failed to retrieve the bitmap, show a debugging red square.

Powered by Google App Engine
This is Rietveld 408576698