summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:33:49 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-29 20:33:49 +0000
commit28f9033b54cd783536fd7cc84d6f0ef536dc5105 (patch)
tree55bb38cfb891207779feab95ed973ec43e78c7d6 /views
parentfed9d32f572333446448158c80e269d87523360e (diff)
downloadchromium_src-28f9033b54cd783536fd7cc84d6f0ef536dc5105.zip
chromium_src-28f9033b54cd783536fd7cc84d6f0ef536dc5105.tar.gz
chromium_src-28f9033b54cd783536fd7cc84d6f0ef536dc5105.tar.bz2
Really theme the find bar. We were previously getting the DefaultThemeProvider (whose accessor was mistakenly named 'getDIALOGthemeprovider')
BUG=11702 TEST=Install a theme and verify that the find bar matches it. Review URL: http://codereview.chromium.org/115729 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17224 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/widget/widget.h8
-rw-r--r--views/widget/widget_win.cc8
2 files changed, 11 insertions, 5 deletions
diff --git a/views/widget/widget.h b/views/widget/widget.h
index efa16c5..14a61a0 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -104,10 +104,10 @@ class Widget {
// Get the theme provider.
virtual ThemeProvider* GetThemeProvider() const { return NULL; }
- // Get the dialog theme provider; this is necessary for when a dialog has
- // no profile (and ThemeProvider) associated with it. The dialog theme
- // provider provides a default set of bitmaps that such dialogs can use.
- virtual ThemeProvider* GetDialogThemeProvider() { return NULL; }
+ // Get the default theme provider; this is necessary for when a widget has
+ // no profile (and ThemeProvider) associated with it. The default theme
+ // provider provides a default set of bitmaps that such widgets can use.
+ virtual ThemeProvider* GetDefaultThemeProvider() { return NULL; }
};
} // namespace views
diff --git a/views/widget/widget_win.cc b/views/widget/widget_win.cc
index 79ec700..c4aa1740 100644
--- a/views/widget/widget_win.cc
+++ b/views/widget/widget_win.cc
@@ -396,7 +396,13 @@ TooltipManager* WidgetWin::GetTooltipManager() {
ThemeProvider* WidgetWin::GetThemeProvider() const {
Widget* widget = GetRootWidget();
if (widget) {
- ThemeProvider* provider = widget->GetDialogThemeProvider();
+ // Attempt to get the theme provider, and fall back to the default theme
+ // provider if not found.
+ ThemeProvider* provider = widget->GetThemeProvider();
+ if (provider)
+ return provider;
+
+ provider = widget->GetDefaultThemeProvider();
if (provider)
return provider;
}