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

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

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR. Created 8 years, 2 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
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 9b263c7dc097dc274ec79e6fee13d20414a44267..d5befbcf0277816960af947b86ecfc62b0e140c7 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.h
+++ b/chrome/browser/ui/webui/options/font_settings_handler.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_FONT_SETTINGS_HANDLER_H_
#include "base/memory/scoped_ptr.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/api/prefs/pref_member.h"
#include "chrome/browser/ui/webui/options/options_ui.h"
@@ -16,7 +17,9 @@ class ListValue;
namespace options {
// Font settings overlay page UI handler.
-class FontSettingsHandler : public OptionsPageUIHandler {
+class FontSettingsHandler
+ : public OptionsPageUIHandler,
+ public PrefObserver {
Mattias Nissler (ping if slow) 2012/10/31 13:29:36 why reformatted (also in a few other places)?
Jói 2012/10/31 14:56:26 Ditto.
public:
FontSettingsHandler();
virtual ~FontSettingsHandler();
@@ -28,10 +31,9 @@ class FontSettingsHandler : public OptionsPageUIHandler {
// WebUIMessageHandler implementation.
virtual void RegisterMessages() OVERRIDE;
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
private:
void HandleFetchFontsData(const ListValue* args);

Powered by Google App Engine
This is Rietveld 408576698