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_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ |
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 public: | 26 public: |
27 explicit ZoomDecoration(LocationBarViewMac* owner); | 27 explicit ZoomDecoration(LocationBarViewMac* owner); |
28 ~ZoomDecoration() override; | 28 ~ZoomDecoration() override; |
29 | 29 |
30 // Called when this decoration should show or hide itself in its most current | 30 // Called when this decoration should show or hide itself in its most current |
31 // state. Returns whether any updates were made. | 31 // state. Returns whether any updates were made. |
32 bool UpdateIfNecessary(ui_zoom::ZoomController* zoom_controller); | 32 bool UpdateIfNecessary(ui_zoom::ZoomController* zoom_controller); |
33 | 33 |
34 // Shows the zoom bubble for this decoration. If |auto_close| is YES, then | 34 // Shows the zoom bubble for this decoration. If |auto_close| is YES, then |
35 // the bubble will automatically close after a fixed period of time. | 35 // the bubble will automatically close after a fixed period of time. |
| 36 // If a bubble is already showing, the |auto_close| timer is reset. |
36 void ShowBubble(BOOL auto_close); | 37 void ShowBubble(BOOL auto_close); |
37 | 38 |
38 // Closes the zoom bubble. | 39 // Closes the zoom bubble. |
39 void CloseBubble(); | 40 void CloseBubble(); |
40 | 41 |
41 protected: | 42 protected: |
42 // Hides all UI associated with the zoom decoration. | 43 // Hides all UI associated with the zoom decoration. |
43 // Virtual and protected for testing. | 44 // Virtual and protected for testing. |
44 virtual void HideUI(); | 45 virtual void HideUI(); |
45 | 46 |
(...skipping 26 matching lines...) Expand all Loading... |
72 // The bubble that this decoration shows. Weak, owns self. | 73 // The bubble that this decoration shows. Weak, owns self. |
73 ZoomBubbleController* bubble_; | 74 ZoomBubbleController* bubble_; |
74 | 75 |
75 // The string to show for a tooltip. | 76 // The string to show for a tooltip. |
76 base::scoped_nsobject<NSString> tooltip_; | 77 base::scoped_nsobject<NSString> tooltip_; |
77 | 78 |
78 DISALLOW_COPY_AND_ASSIGN(ZoomDecoration); | 79 DISALLOW_COPY_AND_ASSIGN(ZoomDecoration); |
79 }; | 80 }; |
80 | 81 |
81 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ | 82 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_ZOOM_DECORATION_H_ |
OLD | NEW |