summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 20:50:37 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-25 20:50:37 +0000
commitae6a8a53c05e77c9c77d4d608915844b6d73593e (patch)
treeef74571c257f69cf4faa81b51a16c34fc792cba4 /chrome/browser
parentc0478b0985b9893601125a88a32a648656a75948 (diff)
downloadchromium_src-ae6a8a53c05e77c9c77d4d608915844b6d73593e.zip
chromium_src-ae6a8a53c05e77c9c77d4d608915844b6d73593e.tar.gz
chromium_src-ae6a8a53c05e77c9c77d4d608915844b6d73593e.tar.bz2
GTK Themes: Fix linux UI frame regression introduced in r24170.
Review URL: http://codereview.chromium.org/173389 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_theme_provider.h4
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc7
2 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h
index 6d81937..068509b 100644
--- a/chrome/browser/browser_theme_provider.h
+++ b/chrome/browser/browser_theme_provider.h
@@ -237,6 +237,10 @@ class BrowserThemeProvider : public base::RefCounted<BrowserThemeProvider>,
Profile* profile() { return profile_; }
+ // Subclasses may need us to not use the on-disk image cache. The GTK
+ // interface needs to generate some images itself.
+ void force_process_images() { process_images_ = true; }
+
private:
typedef std::map<const int, std::string> ImageMap;
typedef std::map<const std::string, SkColor> ColorMap;
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 0643143..63be166 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -205,6 +205,11 @@ void GtkThemeProvider::OnStyleSet(GtkWidget* widget,
}
void GtkThemeProvider::LoadGtkValues() {
+ // Before we start setting images and values, we have to clear out old, stale
+ // values. (If we don't do this, we'll regress startup time in the case where
+ // someone installs a heavyweight theme, then goes back to GTK.)
+ profile()->GetPrefs()->ClearPref(prefs::kCurrentThemeImages);
+
GtkStyle* window_style = gtk_rc_get_style(fake_window_);
GtkStyle* label_style = gtk_rc_get_style(fake_label_.get());
@@ -300,8 +305,10 @@ void GtkThemeProvider::LoadGtkValues() {
SetThemeTintFromGtk(kTintFrameIncognitoInactive, &inactive_frame_color,
kExactColor);
+ force_process_images();
GenerateFrameColors();
GenerateFrameImages();
+ GenerateTabImages();
}
void GtkThemeProvider::SetThemeColorFromGtk(const char* id, GdkColor* color) {