| Index: app/resource_bundle_mac.mm
|
| ===================================================================
|
| --- app/resource_bundle_mac.mm (revision 24269)
|
| +++ app/resource_bundle_mac.mm (working copy)
|
| @@ -17,6 +17,7 @@
|
| #include "base/path_service.h"
|
| #include "base/string_piece.h"
|
| #include "base/string_util.h"
|
| +#include "skia/ext/skia_utils_mac.h"
|
|
|
| ResourceBundle::~ResourceBundle() {
|
| FreeImages();
|
| @@ -116,3 +117,14 @@
|
| data.length() / 2);
|
| return msg;
|
| }
|
| +
|
| +NSImage* ResourceBundle::GetNSImageNamed(int resource_id) {
|
| + // Currently this doesn't make a cache holding these as NSImages because
|
| + // GetBitmapNamed has a cache, and we don't want to double cache.
|
| + SkBitmap* bitmap = GetBitmapNamed(resource_id);
|
| + if (!bitmap)
|
| + return nil;
|
| +
|
| + NSImage* nsimage = gfx::SkBitmapToNSImage(*bitmap);
|
| + return nsimage;
|
| +}
|
|
|