Index: chrome/browser/themes/theme_service.h |
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h |
index b70fd74c3cdb19ec7b8f273e11b1dbbd4532cba1..40df22bc351ed9f478c4f42c100fad741996ec22 100644 |
--- a/chrome/browser/themes/theme_service.h |
+++ b/chrome/browser/themes/theme_service.h |
@@ -18,6 +18,7 @@ |
#include "components/keyed_service/core/keyed_service.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
+#include "extensions/browser/extension_registry_observer.h" |
#include "ui/base/theme_provider.h" |
class CustomThemeSupplier; |
@@ -35,6 +36,7 @@ struct HSL; |
namespace extensions { |
class Extension; |
+class ExtensionRegistry; |
} |
namespace gfx { |
@@ -58,6 +60,7 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification; |
class ThemeService : public base::NonThreadSafe, |
public content::NotificationObserver, |
+ public extensions::ExtensionRegistryObserver, |
public KeyedService, |
public ui::ThemeProvider { |
public: |
@@ -97,6 +100,24 @@ class ThemeService : public base::NonThreadSafe, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) override; |
+ // extensions::ExtensionRegistryObserver: |
+ void OnExtensionLoaded( |
+ content::BrowserContext* browser_context, |
+ const extensions::Extension* extension) override; |
+ void OnExtensionUnloaded( |
+ content::BrowserContext* browser_context, |
+ const extensions::Extension* extension, |
+ extensions::UnloadedExtensionInfo::Reason reason) override; |
+ void OnExtensionWillBeInstalled( |
+ content::BrowserContext* browser_context, |
+ const extensions::Extension* extension, |
+ bool is_update, |
+ bool from_ephemeral, |
+ const std::string& old_name) override; |
+ |
+ // KeyedService: |
+ void Shutdown() override; |
+ |
// Set the current theme to the theme defined in |extension|. |
// |extension| must already be added to this profile's |
// ExtensionService. |
@@ -246,6 +267,8 @@ class ThemeService : public base::NonThreadSafe, |
content::NotificationRegistrar registrar_; |
+ extensions::ExtensionRegistry* extension_registry_; |
+ |
scoped_ptr<ThemeSyncableService> theme_syncable_service_; |
base::WeakPtrFactory<ThemeService> weak_ptr_factory_; |