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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_ui.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/ntp/new_tab_ui.h
diff --git a/chrome/browser/ui/webui/ntp/new_tab_ui.h b/chrome/browser/ui/webui/ntp/new_tab_ui.h
index 0fd64c51527f7666db465942d854eedd7313b17f..f3c76f48b823a3bf6bce3a14d5be45c4ebb5c854 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_ui.h
+++ b/chrome/browser/ui/webui/ntp/new_tab_ui.h
@@ -10,6 +10,7 @@
#include "base/gtest_prod_util.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "base/time.h"
#include "base/timer.h"
#include "chrome/browser/sessions/tab_restore_service.h"
@@ -24,7 +25,8 @@ class Profile;
// The WebContents used for the New Tab page.
class NewTabUI : public content::WebUIController,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver {
public:
explicit NewTabUI(content::WebUI* web_ui);
virtual ~NewTabUI();
@@ -103,6 +105,9 @@ class NewTabUI : public content::WebUIController,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
Mattias Nissler (ping if slow) 2012/10/31 13:29:36 // PrefObserver:
Jói 2012/10/31 14:56:26 Done.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Reset the CSS caches.
void InitializeCSSCaches();

Powered by Google App Engine
This is Rietveld 408576698