Index: chrome/browser/ui/webui/ntp/ntp_resource_cache.h |
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h |
index c4a57b1461d4e6a43f8fa6425790e05ee6ffbc2d..856964942ab17e65e829c4ab3ba710237ef6aea4 100644 |
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.h |
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.h |
@@ -9,6 +9,7 @@ |
#include "base/compiler_specific.h" |
#include "base/memory/ref_counted.h" |
#include "base/prefs/public/pref_change_registrar.h" |
+#include "base/prefs/public/pref_observer.h" |
#include "base/string16.h" |
#include "chrome/browser/profiles/profile_keyed_service.h" |
#include "content/public/browser/notification_observer.h" |
@@ -27,6 +28,7 @@ class ThemeProvider; |
// This class keeps a cache of NTP resources (HTML and CSS) so we don't have to |
// regenerate them all the time. |
class NTPResourceCache : public content::NotificationObserver, |
+ public PrefObserver, |
public ProfileKeyedService { |
public: |
explicit NTPResourceCache(Profile* profile); |
@@ -40,6 +42,10 @@ class NTPResourceCache : public content::NotificationObserver, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) OVERRIDE; |
+ // PrefObserver interface. |
+ virtual void OnPreferenceChanged(PrefServiceBase* service, |
+ const std::string& pref_name) OVERRIDE; |
+ |
// Returns the CSS background-position-y style for new_tab_theme.css: |
// - |y_pos| is the vertical offset of theme image in content view. |
// - |alignment| is alignment of theme image. |