diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-22 18:34:10 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-22 18:34:10 +0000 |
commit | 1279d5f395182c6fa783da0d85216777d931af6b (patch) | |
tree | 65eac9c68a5896e0fb3b39bc62344d8a8fb6b03d /app/theme_provider.h | |
parent | 3e3f0eb47762a85110fb11b850df776b59073f8d (diff) | |
download | chromium_src-1279d5f395182c6fa783da0d85216777d931af6b.zip chromium_src-1279d5f395182c6fa783da0d85216777d931af6b.tar.gz chromium_src-1279d5f395182c6fa783da0d85216777d931af6b.tar.bz2 |
Theme image support for the Mac.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/140007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/theme_provider.h')
-rw-r--r-- | app/theme_provider.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/app/theme_provider.h b/app/theme_provider.h index 774810e..75e9255 100644 --- a/app/theme_provider.h +++ b/app/theme_provider.h @@ -10,7 +10,13 @@ #if defined(OS_LINUX) #include <gdk/gdk.h> -#endif +#elif defined(OS_MACOSX) +#ifdef __OBJC__ +@class NSImage; +#else +class NSImage; +#endif // __OBJC__ +#endif // OS_* class SkBitmap; @@ -25,7 +31,7 @@ class SkBitmap; class ThemeProvider { public: - virtual ~ThemeProvider() { } + virtual ~ThemeProvider(); // Get the bitmap specified by |id|. An implementation of ThemeProvider should // have its own source of ids (e.g. an enum, or external resource bundle). @@ -56,6 +62,14 @@ class ThemeProvider { // pointer to a shared empty placeholder bitmap so it will be visible what // is missing. virtual GdkPixbuf* GetPixbufNamed(int id) = 0; +#elif defined(OS_MACOSX) + // Gets the NSImage with the specified |id|. Returns a pointer to a shared + // instance of the NSImage. This shared NSImage is owned by the theme + // provider and should not be freed. + // + // The bitmap is not assumed to exist. If a theme does not provide an image, + // this function will return nil. + virtual NSImage* GetNSImageNamed(int id) = 0; #endif }; |