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

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

Issue 14895016: Make ThemeService use the ExtensionSystem's AsyncEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/ThenRun/Post/ Created 7 years, 7 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 | « no previous file | 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 4baa6af24a7b77cb4cd85bbefe660a74f674c9d5..cd04f90c27841b1e6fc5b4bbf461d483d494c3f4 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -13,10 +13,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_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;
@@ -52,7 +51,6 @@ extern "C" NSString* const kBrowserThemeDidChangeNotification;
#endif // __OBJC__
class ThemeService : public base::NonThreadSafe,
- public content::NotificationObserver,
public ProfileKeyedService,
public ui::ThemeProvider {
public:
@@ -94,11 +92,6 @@ class ThemeService : public base::NonThreadSafe,
virtual GdkPixbuf* GetRTLEnabledPixbufNamed(int id) const OVERRIDE;
#endif
- // Overridden from content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// Set the current theme to the theme defined in |extension|.
// |extension| must already be added to this profile's
// ExtensionService.
@@ -170,6 +163,8 @@ class ThemeService : public base::NonThreadSafe,
private:
friend class ThemeServiceTest;
+ void FinishLoadingAfterExtensionsReady();
+
// Migrate the theme to the new theme pack schema by recreating the data pack
// from the extension.
void MigrateTheme();
@@ -217,7 +212,7 @@ class ThemeService : public base::NonThreadSafe,
// The number of infobars currently displayed.
int number_of_infobars_;
- content::NotificationRegistrar registrar_;
+ base::WeakPtrFactory<ThemeService> weak_ptr_factory_;
scoped_ptr<ThemeSyncableService> theme_syncable_service_;
« no previous file with comments | « no previous file | chrome/browser/themes/theme_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698