Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(734)

Unified Diff: chrome/browser/browser_theme_provider.h

Issue 151153: Allow getting the theme tint as a value so that it can be applied independent... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « app/theme_provider.h ('k') | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_theme_provider.h
===================================================================
--- chrome/browser/browser_theme_provider.h (revision 19724)
+++ chrome/browser/browser_theme_provider.h (working copy)
@@ -74,6 +74,7 @@
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 @@
// 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 @@
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 @@
#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_;
« no previous file with comments | « app/theme_provider.h ('k') | chrome/browser/browser_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698