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

Unified Diff: chrome/browser/ui/zoom/zoom_controller.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit Created 8 years, 1 month 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 | « chrome/browser/ui/webui/options/startup_pages_handler.cc ('k') | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/zoom/zoom_controller.h
diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h
index ffc2a78fe0373aca4bfdc05129fb3bb49f198c82..f7aed95ba46d1245da291190d5523d918b8fa379 100644
--- a/chrome/browser/ui/zoom/zoom_controller.h
+++ b/chrome/browser/ui/zoom/zoom_controller.h
@@ -7,6 +7,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/api/prefs/pref_member.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -21,6 +22,7 @@ class WebContents;
// Per-tab class to manage the Omnibox zoom icon.
class ZoomController : public content::NotificationObserver,
+ public PrefObserver,
public content::WebContentsObserver,
public content::WebContentsUserData<ZoomController> {
public:
@@ -50,6 +52,10 @@ class ZoomController : public content::NotificationObserver,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver overrides:
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Updates the zoom icon and zoom percentage based on current values and
// notifies the observer if changes have occurred. |host| may be empty,
// meaning the change should apply to ~all sites. If it is not empty, the
« no previous file with comments | « chrome/browser/ui/webui/options/startup_pages_handler.cc ('k') | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698