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

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

Issue 12039058: content: convert zoom notifications to observer usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: callbacks Created 7 years, 11 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/zoom/zoom_controller.h
diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h
index 1dd7809c84c59acb7ebbfbf7f5bb0bf95d1ff318..ad54a47e8856b1ec0c3eac937591011ab57db14b 100644
--- a/chrome/browser/ui/zoom/zoom_controller.h
+++ b/chrome/browser/ui/zoom/zoom_controller.h
@@ -8,8 +8,6 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/prefs/public/pref_member.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -20,8 +18,7 @@ class WebContents;
}
// Per-tab class to manage the Omnibox zoom icon.
-class ZoomController : public content::NotificationObserver,
- public content::WebContentsObserver,
+class ZoomController : public content::WebContentsObserver,
public content::WebContentsUserData<ZoomController> {
public:
virtual ~ZoomController();
@@ -36,16 +33,13 @@ class ZoomController : public content::NotificationObserver,
void set_observer(ZoomObserver* observer) { observer_ = observer; }
+ void OnZoomLevelChanged(const std::string& host);
jam 2013/01/30 17:50:44 nit: make this private if it doesn't need to be pu
+
// content::WebContentsObserver overrides:
virtual void DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) OVERRIDE;
- // content::NotificationObserver overrides:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
private:
explicit ZoomController(content::WebContents* web_contents);
friend class content::WebContentsUserData<ZoomController>;
@@ -60,8 +54,6 @@ class ZoomController : public content::NotificationObserver,
// The current zoom percentage.
int zoom_percent_;
- content::NotificationRegistrar registrar_;
-
// Used to access the default zoom level preference.
DoublePrefMember default_zoom_level_;

Powered by Google App Engine
This is Rietveld 408576698