Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: chrome/browser/browser_theme_provider.cc

Issue 1117008: Set the details field of the BROWSER_THEME_CHANGED notification to (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_theme_provider.h ('k') | chrome/browser/gtk/gtk_theme_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_theme_provider.cc
diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc
index fabeb9c0f9253c1a49efc6a4168555f9e7b2bca8..f4f536bf23171af5cbdbb9f1891297c0ac1bc89e 100644
--- a/chrome/browser/browser_theme_provider.cc
+++ b/chrome/browser/browser_theme_provider.cc
@@ -21,7 +21,9 @@
#include "chrome/browser/theme_resources_util.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/extensions/extension.h"
+#include "chrome/common/notification_details.h"
#include "chrome/common/notification_service.h"
+#include "chrome/common/notification_source.h"
#include "chrome/common/notification_type.h"
#include "chrome/common/pref_names.h"
#include "gfx/codec/png_codec.h"
@@ -292,7 +294,7 @@ void BrowserThemeProvider::SetTheme(Extension* extension) {
BuildFromExtension(extension);
SaveThemeID(extension->id());
- NotifyThemeChanged();
+ NotifyThemeChanged(extension);
UserMetrics::RecordAction("Themes_Installed", profile_);
}
@@ -317,7 +319,7 @@ void BrowserThemeProvider::RemoveUnusedThemes() {
void BrowserThemeProvider::UseDefaultTheme() {
ClearAllThemeData();
- NotifyThemeChanged();
+ NotifyThemeChanged(NULL);
UserMetrics::RecordAction("Themes_Reset", profile_);
}
@@ -561,12 +563,12 @@ void BrowserThemeProvider::LoadThemePrefs() {
}
}
-void BrowserThemeProvider::NotifyThemeChanged() {
+void BrowserThemeProvider::NotifyThemeChanged(Extension* extension) {
// Redraw!
NotificationService* service = NotificationService::current();
service->Notify(NotificationType::BROWSER_THEME_CHANGED,
Source<BrowserThemeProvider>(this),
- NotificationService::NoDetails());
+ Details<Extension>(extension));
#if defined(OS_MACOSX)
NotifyPlatformThemeChanged();
#endif // OS_MACOSX
« no previous file with comments | « chrome/browser/browser_theme_provider.h ('k') | chrome/browser/gtk/gtk_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698