summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/gtk_theme_service.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 20:32:08 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 20:32:08 +0000
commita3e61e816e52e956ed57d7edc1341ee2d61e0c7e (patch)
tree3fa44483afe024effc0d0bf064667a1bf9461001 /chrome/browser/ui/gtk/gtk_theme_service.cc
parent2c5c2d07325f72e4c2d2a10c7ed6669683e6f86d (diff)
downloadchromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.zip
chromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.tar.gz
chromium_src-a3e61e816e52e956ed57d7edc1341ee2d61e0c7e.tar.bz2
[Sync] Simplify themes notifications and themes sync
Change ThemesService to listen to EXTENSION_LOADED instead of THEME_INSTALLED. Remove THEME_INSTALLED notification and always send EXTENSION_INSTALLED. Remove Extension details from BROWSER_THEME_CHANGED notification. The two changes above make it so that listeners to BROWSER_THEME_CHANGED can simply query the ThemeService about the new theme; previously this was not possible since the theme was only installed and not loaded. Cut out the now-unneeded code in ThemeChangeProcessor (yay!). BUG=74831 TEST= Review URL: http://codereview.chromium.org/6874001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81795 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/gtk_theme_service.cc')
-rw-r--r--chrome/browser/ui/gtk/gtk_theme_service.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/ui/gtk/gtk_theme_service.cc b/chrome/browser/ui/gtk/gtk_theme_service.cc
index df6d913..8e433d6 100644
--- a/chrome/browser/ui/gtk/gtk_theme_service.cc
+++ b/chrome/browser/ui/gtk/gtk_theme_service.cc
@@ -348,7 +348,7 @@ void GtkThemeService::SetNativeTheme() {
profile()->GetPrefs()->SetBoolean(prefs::kUsesSystemTheme, true);
ClearAllThemeData();
LoadGtkValues();
- NotifyThemeChanged(NULL);
+ NotifyThemeChanged();
}
bool GtkThemeService::UsingDefaultTheme() {
@@ -631,8 +631,8 @@ void GtkThemeService::LoadThemePrefs() {
RebuildMenuIconSets();
}
-void GtkThemeService::NotifyThemeChanged(const Extension* extension) {
- ThemeService::NotifyThemeChanged(extension);
+void GtkThemeService::NotifyThemeChanged() {
+ ThemeService::NotifyThemeChanged();
// Notify all GtkChromeButtons of their new rendering mode:
for (std::vector<GtkWidget*>::iterator it = chrome_buttons_.begin();
@@ -664,7 +664,7 @@ void GtkThemeService::OnStyleSet(GtkWidget* widget,
if (profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme)) {
ClearAllThemeData();
LoadGtkValues();
- NotifyThemeChanged(NULL);
+ NotifyThemeChanged();
}
RebuildMenuIconSets();