| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ | 6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/zoom/zoom_controller.h" | 9 #include "chrome/browser/ui/zoom/zoom_controller.h" |
| 10 | 10 |
| 11 class TabContents; | 11 class TabContents; |
| 12 typedef TabContents TabContentsWrapper; | |
| 13 | 12 |
| 14 // Interface for objects that wish to be notified of changes in ZoomController. | 13 // Interface for objects that wish to be notified of changes in ZoomController. |
| 15 class ZoomObserver { | 14 class ZoomObserver { |
| 16 public: | 15 public: |
| 17 // Notification that the Omnibox zoom icon should change. | 16 // Notification that the Omnibox zoom icon should change. |
| 18 virtual void OnZoomIconChanged(TabContentsWrapper* source, | 17 virtual void OnZoomIconChanged(TabContents* source, |
| 19 ZoomController::ZoomIconState state) = 0; | 18 ZoomController::ZoomIconState state) = 0; |
| 20 | 19 |
| 21 // Notification that the zoom percentage has changed. | 20 // Notification that the zoom percentage has changed. |
| 22 virtual void OnZoomChanged(TabContentsWrapper* source, | 21 virtual void OnZoomChanged(TabContents* source, |
| 23 int zoom_percent, | 22 int zoom_percent, |
| 24 bool can_show_bubble) = 0; | 23 bool can_show_bubble) = 0; |
| 25 | 24 |
| 26 protected: | 25 protected: |
| 27 virtual ~ZoomObserver() {} | 26 virtual ~ZoomObserver() {} |
| 28 }; | 27 }; |
| 29 | 28 |
| 30 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ | 29 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ |
| OLD | NEW |