summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 18:09:38 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-07 18:09:38 +0000
commit4b5ea27735e55571b5c745e5827fc1e217d97447 (patch)
treecda78aa3bf86fa440525126f8daf2404782450fc /gfx
parent18b0832d7e012df21a196777add97c67e4b72cd9 (diff)
downloadchromium_src-4b5ea27735e55571b5c745e5827fc1e217d97447.zip
chromium_src-4b5ea27735e55571b5c745e5827fc1e217d97447.tar.gz
chromium_src-4b5ea27735e55571b5c745e5827fc1e217d97447.tar.bz2
Add new widget API to Pepper to replace the old theming API. The implementation is a copy of the WebKit code, I will figure out how to reuse it soon.
Review URL: http://codereview.chromium.org/2011004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx')
-rw-r--r--gfx/native_theme_win.cc7
-rw-r--r--gfx/native_theme_win.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/gfx/native_theme_win.cc b/gfx/native_theme_win.cc
index 87024d3..ec70b2f 100644
--- a/gfx/native_theme_win.cc
+++ b/gfx/native_theme_win.cc
@@ -659,6 +659,13 @@ void NativeTheme::CloseHandles() const
}
}
+bool NativeTheme::IsClassicTheme(ThemeName name) const {
+ if (!theme_dll_)
+ return true;
+
+ return !GetThemeHandle(name);
+}
+
HANDLE NativeTheme::GetThemeHandle(ThemeName theme_name) const
{
if (!open_theme_ || theme_name < 0 || theme_name >= LAST)
diff --git a/gfx/native_theme_win.h b/gfx/native_theme_win.h
index 504ce46..8dd320b 100644
--- a/gfx/native_theme_win.h
+++ b/gfx/native_theme_win.h
@@ -254,6 +254,9 @@ class NativeTheme {
// for a theme change.
void CloseHandles() const;
+ // Returns true if classic theme is in use.
+ bool IsClassicTheme(ThemeName name) const;
+
// Gets our singleton instance.
static const NativeTheme* instance();