Chromium Code Reviews| 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 1d2f2754faa15be9f6d1a83274df8b52af720df5..e122b9054c26e3f9136a7ec23abe79ac9922ab05 100644 |
| --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
| +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.h |
| @@ -87,6 +87,7 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView, |
| void Init() override; |
| void WindowClosing() override; |
| void CloseBubble() override; |
| + bool ShouldSnapFrameWidth() const override; |
|
tapted
2017/05/16 06:29:02
since LocationBarBubbleDelegateView::GetDialogButt
varkha
2017/05/16 22:53:07
Done.
|
| // views::ButtonListener: |
| void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
| @@ -103,6 +104,9 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView, |
| // the zoom change. |
| void SetExtensionInfo(const extensions::Extension* extension); |
| + // Updates |label_| with the up to date zoom. |
| + void UpdateZoomPercent(); |
| + |
| // Starts a timer which will close the bubble if |auto_close_| is true. |
| void StartTimerIfNecessary(); |
| @@ -119,6 +123,9 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView, |
| // Timer used to auto close the bubble. |
| base::OneShotTimer timer_; |
| + // Timer duration that is made longer if a user presses + or - buttons. |
| + base::TimeDelta auto_close_duration_; |
| + |
| // Image button in the zoom bubble that will show the |extension_icon_| image |
| // if an extension initiated the zoom change, and links to that extension at |
| // "chrome://extensions". |
| @@ -127,12 +134,22 @@ class ZoomBubbleView : public LocationBarBubbleDelegateView, |
| // Label displaying the zoom percentage. |
| views::Label* label_; |
| + // Action buttons that can change zoom. |
| + views::Button* zoom_out_button_; |
| + views::Button* zoom_in_button_; |
| + views::Button* reset_button_; |
| + |
| // The WebContents for the page whose zoom has changed. |
| content::WebContents* web_contents_; |
| // Whether the currently displayed bubble will automatically close. |
| bool auto_close_; |
| + // Used to ignore close requests generated automatically in response to |
| + // button presses, since pressing a button in the bubble should not trigger |
| + // closing. |
| + bool ignore_close_bubble_; |
| + |
| // The immersive mode controller for the BrowserView containing |
| // |web_contents_|. |
| // Not owned. |