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

Unified Diff: app/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 | « no previous file | chrome/browser/browser_theme_provider.h » ('j') | chrome/browser/browser_theme_provider.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/theme_provider.h
===================================================================
--- app/theme_provider.h (revision 39252)
+++ app/theme_provider.h (working copy)
@@ -71,20 +71,23 @@
// Gets the NSImage with the specified |id|.
//
// The bitmap is not assumed to exist. If a theme does not provide an image,
+ // if |allow_default| is true, then the default image will be returned, else
// this function will return nil.
- virtual NSImage* GetNSImageNamed(int id) const = 0;
+ virtual NSImage* GetNSImageNamed(int id, bool allow_default) const = 0;
// Gets the NSColor with the specified |id|.
//
- // The color is not assumed to exist. If a theme does not provide an color,
- // this function will return nil.
- virtual NSColor* GetNSColor(int id) const = 0;
+ // The color is not assumed to exist. If a theme does not provide an color, if
+ // |allow_default| is true, then the default color will be returned, else this
+ // function will return nil.
+ virtual NSColor* GetNSColor(int id, bool allow_default) const = 0;
// Gets the NSColor for tinting with the specified |id|.
//
// 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;
+ // that id, if |allow_default| is true, then the default tint will be
+ // returned, else this function will return nil.
+ virtual NSColor* GetNSColorTint(int id, bool allow_default) 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
« no previous file with comments | « no previous file | chrome/browser/browser_theme_provider.h » ('j') | chrome/browser/browser_theme_provider.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698