diff options
author | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-23 01:37:15 +0000 |
---|---|---|
committer | pvalchev@google.com <pvalchev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-23 01:37:15 +0000 |
commit | b05be39e20ae9d70bc54c7511d8199517294a2dd (patch) | |
tree | 24750b9f4e7ce4061740c08027cea3855572c1af /app/theme_provider.h | |
parent | 53adb9a6d5c506d8df8a08adc092acd524a79753 (diff) | |
download | chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.zip chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.gz chromium_src-b05be39e20ae9d70bc54c7511d8199517294a2dd.tar.bz2 |
OpenBSD/FreeBSD ifdefs and GYP changes for app/ directory
- Use OS_POSIX && !OS_MACOSX defines to capture Linux/*BSD as they
have many similarities, use other defines instead of OS_LINUX
where sensible.
Based on original work by Sprewell and Ben Laurie on FreeBSD port
Review URL: http://codereview.chromium.org/548126
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/theme_provider.h')
-rw-r--r-- | app/theme_provider.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/app/theme_provider.h b/app/theme_provider.h index 13b421e..cd97fa8 100644 --- a/app/theme_provider.h +++ b/app/theme_provider.h @@ -10,10 +10,7 @@ #include "base/basictypes.h" #include "third_party/skia/include/core/SkColor.h" -#if defined(OS_LINUX) -typedef struct _GdkColor GdkColor; -typedef struct _GdkPixbuf GdkPixbuf; -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) #ifdef __OBJC__ @class NSColor; @class NSImage; @@ -21,6 +18,9 @@ typedef struct _GdkPixbuf GdkPixbuf; class NSColor; class NSImage; #endif // __OBJC__ +#elif !defined(OS_WIN) +typedef struct _GdkColor GdkColor; +typedef struct _GdkPixbuf GdkPixbuf; #endif // OS_* class Profile; @@ -67,20 +67,7 @@ class ThemeProvider { // implementations of ThemeProvider. Returns NULL on error. virtual RefCountedMemory* GetRawData(int id) const = 0; -#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) - // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared - // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme - // provider and should not be freed. - // - // The bitmap is assumed to exist. This function will log in release, and - // assert in debug mode if it does not. On failure, this will return a - // pointer to a shared empty placeholder bitmap so it will be visible what - // is missing. - virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; - - // As above, but flips it in RTL locales. - virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; -#elif defined(OS_MACOSX) +#if defined(OS_MACOSX) // Gets the NSImage with the specified |id|. // // The bitmap is not assumed to exist. If a theme does not provide an image, @@ -98,6 +85,19 @@ class ThemeProvider { // The tint is not assumed to exist. If a theme does not provide a tint with // that id, this function will return nil. virtual NSColor* GetNSColorTint(int id) const = 0; +#elif defined(OS_POSIX) && !defined(TOOLKIT_VIEWS) + // Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared + // instance of the GdkPixbuf. This shared GdkPixbuf is owned by the theme + // provider and should not be freed. + // + // The bitmap is assumed to exist. This function will log in release, and + // assert in debug mode if it does not. On failure, this will return a + // pointer to a shared empty placeholder bitmap so it will be visible what + // is missing. + virtual GdkPixbuf* GetPixbufNamed(int id) const = 0; + + // As above, but flips it in RTL locales. + virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0; #endif }; |