diff options
author | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 16:35:58 +0000 |
---|---|---|
committer | thomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 16:35:58 +0000 |
commit | 5f5314397438f59cb923beffe74c74c086636133 (patch) | |
tree | 4e66559d543b679b8b5d112764ce6e2a16e017df /app/resource_bundle.h | |
parent | 67111a4747a162679d2e711c078e54e513411f29 (diff) | |
download | chromium_src-5f5314397438f59cb923beffe74c74c086636133.zip chromium_src-5f5314397438f59cb923beffe74c74c086636133.tar.gz chromium_src-5f5314397438f59cb923beffe74c74c086636133.tar.bz2 |
Add a helper to resource bundle to get an NSImage back.
skia/ext/skia_utils_mac.h includes CoreGraphics/CGColor.h so we have to relay the framework include path so someone can include the header without errors.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/173363
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/resource_bundle.h')
-rw-r--r-- | app/resource_bundle.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/resource_bundle.h b/app/resource_bundle.h index bba8560..85b4b65 100644 --- a/app/resource_bundle.h +++ b/app/resource_bundle.h @@ -35,6 +35,14 @@ class SkBitmap; typedef uint32 SkColor; class StringPiece; +#if defined(OS_MACOSX) +#ifdef __OBJC__ +@class NSImage; +#else +class NSImage; +#endif // __OBJC__ +#endif // defined(OS_MACOSX) + // ResourceBundle is a central facility to load images and other resources, // such as theme graphics. // Every resource is loaded only once. @@ -112,6 +120,9 @@ class ResourceBundle { // Loads and returns a cursor from the app module. HCURSOR LoadCursor(int cursor_id); +#elif defined(OS_MACOSX) + // Wrapper for GetBitmapNamed. Converts the bitmap to an autoreleased NSImage. + NSImage* GetNSImageNamed(int resource_id); #elif defined(OS_LINUX) // Gets the GdkPixbuf with the specified resource_id, first by looking into // the theme data, than in the current module data if applicable. Returns a |