summaryrefslogtreecommitdiffstats
path: root/app/theme_provider.h
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:00:09 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-13 20:00:09 +0000
commitb5d079536bcbf33c657fd96079bb7b2bd9644c0e (patch)
treeb9f4a20f69bbd3252464cf96e13b21d3d5b5ca09 /app/theme_provider.h
parent89beb4c0dc72aeb590a8944bf2f24b95b9c90425 (diff)
downloadchromium_src-b5d079536bcbf33c657fd96079bb7b2bd9644c0e.zip
chromium_src-b5d079536bcbf33c657fd96079bb7b2bd9644c0e.tar.gz
chromium_src-b5d079536bcbf33c657fd96079bb7b2bd9644c0e.tar.bz2
Make the ThemeProvider methods const.
BUG=none TEST=none Review URL: http://codereview.chromium.org/266037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28868 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/theme_provider.h')
-rw-r--r--app/theme_provider.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/app/theme_provider.h b/app/theme_provider.h
index f9a9bb5..c3b8a9c 100644
--- a/app/theme_provider.h
+++ b/app/theme_provider.h
@@ -43,26 +43,27 @@ class ThemeProvider {
// Get the bitmap specified by |id|. An implementation of ThemeProvider should
// have its own source of ids (e.g. an enum, or external resource bundle).
- virtual SkBitmap* GetBitmapNamed(int id) = 0;
+ virtual SkBitmap* GetBitmapNamed(int id) const = 0;
// Get the color specified by |id|.
- virtual SkColor GetColor(int id) = 0;
+ virtual SkColor GetColor(int id) const = 0;
// Get the property (e.g. an alignment expressed in an enum, or a width or
// height) specified by |id|.
- virtual bool GetDisplayProperty(int id, int* result) = 0;
+ virtual bool GetDisplayProperty(int id, int* result) const = 0;
// Whether we should use the native system frame (typically Aero glass) or
// a custom frame.
- virtual bool ShouldUseNativeFrame() = 0;
+ virtual bool ShouldUseNativeFrame() const = 0;
// Whether or not we have a certain image. Used for when the default theme
// doesn't provide a certain image, but custom themes might (badges, etc).
- virtual bool HasCustomImage(int id) = 0;
+ virtual bool HasCustomImage(int id) const = 0;
// Reads the image data from the theme file into the specified vector. Returns
// true on success.
- virtual bool GetRawData(int id, std::vector<unsigned char>* raw_data) = 0;
+ virtual bool GetRawData(int id,
+ std::vector<unsigned char>* raw_data) const = 0;
#if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
// Gets the GdkPixbuf with the specified |id|. Returns a pointer to a shared
@@ -73,28 +74,28 @@ class ThemeProvider {
// 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) = 0;
+ virtual GdkPixbuf* GetPixbufNamed(int id) const = 0;
// As above, but flips it in RTL locales.
- virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) = 0;
+ virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const = 0;
#elif 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,
// this function will return nil.
- virtual NSImage* GetNSImageNamed(int id) = 0;
+ virtual NSImage* GetNSImageNamed(int id) 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) = 0;
+ virtual NSColor* GetNSColor(int id) 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) = 0;
+ virtual NSColor* GetNSColorTint(int id) const = 0;
#endif
};