summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.h
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 18:49:07 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 18:49:07 +0000
commit9366cf747481b8fb04f5e76beae807d31d4c6aff (patch)
tree91d2de15704752993dca73abd204087349f439dc /chrome/browser/browser_theme_provider.h
parent549935ac8361186f358f80b3b15ec31b1329a85a (diff)
downloadchromium_src-9366cf747481b8fb04f5e76beae807d31d4c6aff.zip
chromium_src-9366cf747481b8fb04f5e76beae807d31d4c6aff.tar.gz
chromium_src-9366cf747481b8fb04f5e76beae807d31d4c6aff.tar.bz2
Allow getting the theme tint as a value so that it can be applied independent of the theme provider. Since the Mac needs it to tint its vector resources it's added to the Mac.
BUG=none TEST=none Review URL: http://codereview.chromium.org/151153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.h')
-rw-r--r--chrome/browser/browser_theme_provider.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h
index 7e5c144..b43a69c 100644
--- a/chrome/browser/browser_theme_provider.h
+++ b/chrome/browser/browser_theme_provider.h
@@ -74,6 +74,7 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
virtual GdkPixbuf* GetPixbufNamed(int id);
#elif defined(OS_MACOSX)
virtual NSImage* GetNSImageNamed(int id);
+ virtual NSColor* GetNSColorTint(int id);
#endif
// Set the current theme to the theme defined in |extension|.
@@ -104,6 +105,12 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
// otherwise modified, or an application default.
SkBitmap* LoadThemeBitmap(int id);
+ // Returns the string key for the given tint |id| TINT_* enum value.
+ const std::string GetTintKey(int id);
+
+ // Returns the default tint for the given tint |id| TINT_* enum value.
+ skia::HSL GetDefaultTint(int id);
+
// Get the specified tint - |id| is one of the TINT_* enum values.
skia::HSL GetTint(int id);
@@ -158,11 +165,11 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
SkColor FindColor(const char* id, SkColor default_color);
// Frees generated images and clears the image cache.
- void FreeImages();
+ void ClearCaches();
- // Clears the platform-specific image cache. Do not call directly; it's called
- // from FreeImages().
- void FreePlatformImages();
+ // Clears the platform-specific caches. Do not call directly; it's called
+ // from ClearCaches().
+ void FreePlatformCaches();
// Cached images. We cache all retrieved and generated bitmaps and keep
// track of the pointers. We own these and will delete them when we're done
@@ -175,6 +182,8 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
#elif defined(OS_MACOSX)
typedef std::map<int, NSImage*> NSImageMap;
NSImageMap nsimage_cache_;
+ typedef std::map<int, NSColor*> NSColorMap;
+ NSColorMap nscolor_cache_;
#endif
ResourceBundle& rb_;