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_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "ui/views/bubble/bubble_delegate.h" | 10 #include "ui/views/bubble/bubble_delegate.h" |
11 #include "ui/views/controls/button/button.h" | 11 #include "ui/views/controls/button/button.h" |
12 #include "ui/views/controls/button/text_button.h" | 12 #include "ui/views/controls/button/text_button.h" |
13 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
14 #include "ui/views/events/event.h" | |
15 | 14 |
16 class TabContents; | 15 class TabContents; |
17 | 16 |
18 // View used to display the zoom percentage when it has changed. | 17 // View used to display the zoom percentage when it has changed. |
19 class ZoomBubbleView : public views::BubbleDelegateView, | 18 class ZoomBubbleView : public views::BubbleDelegateView, |
20 public views::ButtonListener { | 19 public views::ButtonListener { |
21 public: | 20 public: |
22 // Shows the bubble and automatically closes it after a short time period if | 21 // Shows the bubble and automatically closes it after a short time period if |
23 // |auto_close| is true. | 22 // |auto_close| is true. |
24 static void ShowBubble(views::View* anchor_view, | 23 static void ShowBubble(views::View* anchor_view, |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // The TabContents for the page whose zoom has changed. | 71 // The TabContents for the page whose zoom has changed. |
73 TabContents* tab_contents_; | 72 TabContents* tab_contents_; |
74 | 73 |
75 // Whether the currently displayed bubble will automatically close. | 74 // Whether the currently displayed bubble will automatically close. |
76 bool auto_close_; | 75 bool auto_close_; |
77 | 76 |
78 DISALLOW_COPY_AND_ASSIGN(ZoomBubbleView); | 77 DISALLOW_COPY_AND_ASSIGN(ZoomBubbleView); |
79 }; | 78 }; |
80 | 79 |
81 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ | 80 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_ZOOM_BUBBLE_VIEW_H_ |
OLD | NEW |