Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
index 57eeda8fd639e69545a2bdd774d2e88c7eeaa3b8..0ca316154547c0f840ada222addcae32990545f4 100644 |
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
@@ -11,29 +11,40 @@ |
#include "ui/views/controls/button/button.h" |
#include "ui/views/controls/label.h" |
+class TabContents; |
+ |
// View used to display the zoom percentage when it has changed. |
-class ZoomBubbleView : public views::BubbleDelegateView { |
+class ZoomBubbleView : public views::ButtonListener, |
+ public views::BubbleDelegateView { |
public: |
// Shows the bubble and automatically closes it after a short time period if |
// |auto_close| is true. |
static void ShowBubble(views::View* anchor_view, |
- int zoom_percent, |
+ TabContents* tab_contents, |
bool auto_close); |
static void CloseBubble(); |
static bool IsShowing(); |
private: |
ZoomBubbleView(views::View* anchor_view, |
- int zoom_percent, |
+ TabContents* tab_contents, |
bool auto_close); |
virtual ~ZoomBubbleView(); |
+ // Refreshes the bubble by changing the zoom percentage appropriately and |
+ // resetting the timer if necessary. |
+ void Refresh(); |
+ |
+ // ButtonListener method. |
tfarina
2012/07/17 05:57:56
nit: views::ButtonListener
Kyle Horimoto
2012/07/17 18:26:23
Done.
|
+ virtual void ButtonPressed(views::Button* sender, |
tfarina
2012/07/17 05:57:56
can you move this declaration right after the Clos
Kyle Horimoto
2012/07/17 18:26:23
Done.
|
+ const views::Event& event) OVERRIDE; |
+ |
void Close(); |
// views::BubbleDelegateView method. |
virtual void Init() OVERRIDE; |
- // views::BubbleDelegateView: |
+ // views::BubbleDelegateView method. |
virtual void WindowClosing() OVERRIDE; |
// Singleton instance of the zoom bubble. The zoom bubble can only be shown on |
@@ -47,8 +58,8 @@ class ZoomBubbleView : public views::BubbleDelegateView { |
// Label displaying the zoom percentage. |
views::Label* label_; |
- // The zoom percentage to show in the bubble. |
- int zoom_percent_; |
+ // The TabContents for the page whose zoom has changed. |
+ TabContents* tab_contents_; |
// Whether the currently displayed bubble will automatically close. |
bool auto_close_; |