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

Unified Diff: chrome/browser/browser_theme_provider.h

Issue 630002: Allow the Mac theme provider to give default colors/tints if requested. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: merge Created 10 years, 10 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 39252)
+++ chrome/browser/browser_theme_provider.h (working copy)
@@ -26,6 +26,13 @@
class Profile;
class ResourceBundle;
+#ifdef __OBJC__
+@class NSString;
+// Sent whenever the browser theme changes. Object => NSValue wrapping the
+// BrowserThemeProvider that changed.
+extern "C" NSString* const kBrowserThemeDidChangeNotification;
+#endif // __OBJC__
+
class BrowserThemeProvider : public NonThreadSafe,
public ThemeProvider {
public:
@@ -111,9 +118,9 @@
virtual GdkPixbuf* GetPixbufNamed(int id) const;
virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const;
#elif defined(OS_MACOSX)
- virtual NSImage* GetNSImageNamed(int id) const;
- virtual NSColor* GetNSColor(int id) const;
- virtual NSColor* GetNSColorTint(int id) const;
+ virtual NSImage* GetNSImageNamed(int id, bool allow_default) const;
Nico 2010/02/17 22:22:40 How about using an enum instead of a bool? Makes t
+ virtual NSColor* GetNSColor(int id, bool allow_default) const;
+ virtual NSColor* GetNSColorTint(int id, bool allow_default) const;
#endif
// Set the current theme to the theme defined in |extension|.
@@ -182,6 +189,11 @@
// Let all the browser views know that themes have changed.
virtual void NotifyThemeChanged();
+#if defined(OS_MACOSX)
+ // Let all the browser views know that themes have changed in a platform way.
+ virtual void NotifyPlatformThemeChanged();
+#endif // OS_MACOSX
+
// Clears the platform-specific caches. Do not call directly; it's called
// from ClearCaches().
virtual void FreePlatformCaches();
@@ -215,7 +227,8 @@
#elif defined(OS_MACOSX)
typedef std::map<int, NSImage*> NSImageMap;
mutable NSImageMap nsimage_cache_;
- typedef std::map<int, NSColor*> NSColorMap;
+ // The bool member of the pair is whether the color is a default color.
+ typedef std::map<int, std::pair<NSColor*, bool> > NSColorMap;
mutable NSColorMap nscolor_cache_;
#endif
« 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