| Index: chrome/browser/ui/views/wrench_menu.cc
|
| diff --git a/chrome/browser/ui/views/wrench_menu.cc b/chrome/browser/ui/views/wrench_menu.cc
|
| index ab5c200f552d99795c0e36c383ec716d2dc0fc7d..1eafa19eb1edfa802ca15ca10016f89e80fec988 100644
|
| --- a/chrome/browser/ui/views/wrench_menu.cc
|
| +++ b/chrome/browser/ui/views/wrench_menu.cc
|
| @@ -481,7 +481,7 @@ static const int kTouchZoomPadding = 14;
|
| // the zoom, a label showing the current zoom percent, and a button to go
|
| // full-screen.
|
| class WrenchMenu::ZoomView : public WrenchMenuView,
|
| - public content::NotificationObserver {
|
| + public content::HostZoomMap::Observer {
|
| public:
|
| ZoomView(WrenchMenu* menu,
|
| MenuModel* menu_model,
|
| @@ -489,6 +489,8 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
|
| int increment_index,
|
| int fullscreen_index)
|
| : WrenchMenuView(menu, menu_model),
|
| + content::HostZoomMap::Observer(
|
| + HostZoomMap::GetForBrowserContext(menu->browser_->profile())),
|
| fullscreen_index_(fullscreen_index),
|
| increment_button_(NULL),
|
| zoom_label_(NULL),
|
| @@ -555,11 +557,6 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
|
| AddChildView(fullscreen_button_);
|
|
|
| UpdateZoomControls();
|
| -
|
| - registrar_.Add(
|
| - this, content::NOTIFICATION_ZOOM_LEVEL_CHANGED,
|
| - content::Source<HostZoomMap>(
|
| - HostZoomMap::GetForBrowserContext(menu->browser_->profile())));
|
| }
|
|
|
| // Overridden from View.
|
| @@ -613,11 +610,7 @@ class WrenchMenu::ZoomView : public WrenchMenuView,
|
| }
|
| }
|
|
|
| - // Overridden from content::NotificationObserver.
|
| - virtual void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) OVERRIDE {
|
| - DCHECK_EQ(content::NOTIFICATION_ZOOM_LEVEL_CHANGED, type);
|
| + virtual void OnZoomLevelChanged(const std::string& host) OVERRIDE {
|
| UpdateZoomControls();
|
| }
|
|
|
|
|