summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_theme_provider.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 20:53:25 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-26 20:53:25 +0000
commite001d41b9c174084809b80f784811303b1ef04aa (patch)
tree8715b8ec1093ad04a56b5d96f6f4233a88009f8c /chrome/browser/browser_theme_provider.cc
parent3bf335afc98d4f9e85bb5a3f72974d53cb77ebeb (diff)
downloadchromium_src-e001d41b9c174084809b80f784811303b1ef04aa.zip
chromium_src-e001d41b9c174084809b80f784811303b1ef04aa.tar.gz
chromium_src-e001d41b9c174084809b80f784811303b1ef04aa.tar.bz2
Use regular notifications for theme changes.
This should have no impact on the current behavior. On linux, we'll want to get these notifications in a few places other than just the root browser windows so having it as a regular notification makes it easier for us to just listen for the event. Review URL: http://codereview.chromium.org/149032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_theme_provider.cc')
-rw-r--r--chrome/browser/browser_theme_provider.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index 03b8575..e88d019 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -13,6 +13,8 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/theme_resources_util.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/pref_service.h"
#include "grit/app_resources.h"
@@ -698,10 +700,10 @@ void BrowserThemeProvider::SaveDisplayPropertyData() {
void BrowserThemeProvider::NotifyThemeChanged() {
// Redraw!
- for (BrowserList::const_iterator browser = BrowserList::begin();
- browser != BrowserList::end(); ++browser) {
- (*browser)->window()->UserChangedTheme();
- }
+ NotificationService* service = NotificationService::current();
+ service->Notify(NotificationType::BROWSER_THEME_CHANGED,
+ NotificationService::AllSources(),
+ NotificationService::NoDetails());
}
void BrowserThemeProvider::LoadThemePrefs() {