summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/zoom/zoom_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui/zoom/zoom_controller.h')
-rw-r--r--chrome/browser/ui/zoom/zoom_controller.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h
index 1dd7809..2dda110 100644
--- a/chrome/browser/ui/zoom/zoom_controller.h
+++ b/chrome/browser/ui/zoom/zoom_controller.h
@@ -8,8 +8,7 @@
#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/host_zoom_map.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
@@ -20,8 +19,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();
@@ -41,16 +39,13 @@ class ZoomController : public content::NotificationObserver,
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>;
friend class ZoomControllerTest;
+ void OnZoomLevelChanged(const std::string& host);
+
// 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
@@ -60,14 +55,16 @@ 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_;
// Observer receiving notifications on state changes.
ZoomObserver* observer_;
+ content::BrowserContext* browser_context_;
+
+ content::HostZoomMap::ZoomLevelChangedCallback zoom_callback_;
+
DISALLOW_COPY_AND_ASSIGN(ZoomController);
};