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

Unified Diff: chrome/browser/themes/theme_service.h

Issue 11445038: Revert changes to have ExtensionService notify ThemeService directly for themes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge error Created 8 years 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/extensions/extension_service.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/theme_service.h
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index 89942ed3a205779057a18a48d42bf0aace80bc77..b29dde803a9f2cb5c041c2c2b76f49f21886f7be 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -15,6 +15,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/theme_provider.h"
class BrowserThemePack;
@@ -47,6 +49,7 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification;
#endif // __OBJC__
class ThemeService : public base::NonThreadSafe,
+ public content::NotificationObserver,
public ProfileKeyedService,
public ui::ThemeProvider {
public:
@@ -180,8 +183,6 @@ class ThemeService : public base::NonThreadSafe,
#endif
// Set the current theme to the theme defined in |extension|.
- // |extension| must already be added to this profile's
- // ExtensionService.
virtual void SetTheme(const extensions::Extension* extension);
// Reset the theme to default.
@@ -273,6 +274,11 @@ class ThemeService : public base::NonThreadSafe,
Profile* profile() { return profile_; }
+ // content::NotificationObserver:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
private:
friend class ThemeServiceTest;
@@ -314,6 +320,8 @@ class ThemeService : public base::NonThreadSafe,
// The number of infobars currently displayed.
int number_of_infobars_;
+ content::NotificationRegistrar registrar_;
+
scoped_ptr<ThemeSyncableService> theme_syncable_service_;
DISALLOW_COPY_AND_ASSIGN(ThemeService);
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698