Chromium Code Reviews| Index: chrome/browser/ui/zoom/zoom_observer.h |
| diff --git a/chrome/browser/ui/zoom/zoom_observer.h b/chrome/browser/ui/zoom/zoom_observer.h |
| index 54f52e186b525c9964f0ea51f7b9cfbd98e94db1..11e75b1b82df259575c0859723f7887f7ab2a739 100644 |
| --- a/chrome/browser/ui/zoom/zoom_observer.h |
| +++ b/chrome/browser/ui/zoom/zoom_observer.h |
| @@ -5,6 +5,8 @@ |
| #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ |
| #define CHROME_BROWSER_UI_ZOOM_ZOOM_OBSERVER_H_ |
| +#include "chrome/browser/ui/zoom/zoom_controller.h" |
| + |
| namespace content { |
| class WebContents; |
| } |
| @@ -12,9 +14,26 @@ class WebContents; |
| // Interface for objects that wish to be notified of changes in ZoomController. |
| class ZoomObserver { |
| public: |
| + struct OnZoomChangedEventData { |
|
Dan Beam
2014/07/03 01:28:53
nit: ZoomChangeData or ZoomChangeEventData
wjmaclean
2014/07/03 19:37:21
Done.
|
| + OnZoomChangedEventData(content::WebContents* web_contents, |
| + double old_zoom_level, |
| + double new_zoom_level, |
| + ZoomController::ZoomMode zoom_mode, |
| + bool can_show_bubble) |
| + : web_contents_(web_contents), |
| + old_zoom_level_(old_zoom_level), |
| + new_zoom_level_(new_zoom_level), |
| + zoom_mode_(zoom_mode), |
| + can_show_bubble_(can_show_bubble) {} |
| + content::WebContents* web_contents_; |
| + double old_zoom_level_; |
| + double new_zoom_level_; |
| + ZoomController::ZoomMode zoom_mode_; |
| + bool can_show_bubble_; |
|
Dan Beam
2014/07/03 01:28:53
_ implies these are private but default access in
wjmaclean
2014/07/03 19:37:21
Done.
|
| + }; |
|
Dan Beam
2014/07/03 01:28:53
struct OnZoomChangedEventData {
content::WebCont
wjmaclean
2014/07/03 19:37:21
Not sure I follow ... work in what sense?
Dan Beam
2014/07/07 17:04:17
no ctor or initializer list necessary
|
| + |
| // Notification that the zoom percentage has changed. |
| - virtual void OnZoomChanged(content::WebContents* source, |
| - bool can_show_bubble) = 0; |
| + virtual void OnZoomChanged(const OnZoomChangedEventData& data) {} |
| protected: |
| virtual ~ZoomObserver() {} |