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

Unified Diff: chrome/browser/ui/webui/options/font_settings_handler.h

Issue 399603002: Replace usage of NOTIFICATION_EXTENSION_UNLOADED with ExtensionRegistryObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/ui/webui/options/font_settings_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/font_settings_handler.h
diff --git a/chrome/browser/ui/webui/options/font_settings_handler.h b/chrome/browser/ui/webui/options/font_settings_handler.h
index 3a9c8d812e88085bd7ad9ef8590f171800eaa9c1..c08e008e4ae9f995dd25e4c08030240da1fa2e88 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.h
+++ b/chrome/browser/ui/webui/options/font_settings_handler.h
@@ -7,9 +7,9 @@
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_member.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "extensions/browser/extension_registry_observer.h"
namespace base {
class ListValue;
@@ -17,13 +17,14 @@ class ListValue;
namespace extensions {
class Extension;
+class ExtensionRegistry;
}
namespace options {
// Font settings overlay page UI handler.
class FontSettingsHandler : public OptionsPageUIHandler,
- public content::NotificationObserver {
+ public extensions::ExtensionRegistryObserver {
public:
FontSettingsHandler();
virtual ~FontSettingsHandler();
@@ -37,12 +38,16 @@ class FontSettingsHandler : public OptionsPageUIHandler,
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
- private:
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // ExtensionRegistryObserver implementation.
+ virtual void OnExtensionLoaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension) OVERRIDE;
+ virtual void OnExtensionUnloaded(
+ content::BrowserContext* browser_context,
+ const extensions::Extension* extension,
+ extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE;
+ private:
void HandleFetchFontsData(const base::ListValue* args);
void FontsListHasLoaded(scoped_ptr<base::ListValue> list);
@@ -73,7 +78,9 @@ class FontSettingsHandler : public OptionsPageUIHandler,
IntegerPrefMember default_fixed_font_size_;
IntegerPrefMember minimum_font_size_;
- content::NotificationRegistrar registrar_;
+ ScopedObserver<extensions::ExtensionRegistry,
+ extensions::ExtensionRegistryObserver>
+ extension_registry_observer_;
DISALLOW_COPY_AND_ASSIGN(FontSettingsHandler);
};
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/font_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698