OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_STATUS_BUBBLE_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
(...skipping 23 matching lines...) Expand all Loading... |
34 kBubbleHidingFadeOut // In a fade-out transition | 34 kBubbleHidingFadeOut // In a fade-out transition |
35 }; | 35 }; |
36 | 36 |
37 StatusBubbleMac(NSWindow* parent, id delegate); | 37 StatusBubbleMac(NSWindow* parent, id delegate); |
38 ~StatusBubbleMac() override; | 38 ~StatusBubbleMac() override; |
39 | 39 |
40 // StatusBubble implementation. | 40 // StatusBubble implementation. |
41 void SetStatus(const base::string16& status) override; | 41 void SetStatus(const base::string16& status) override; |
42 void SetURL(const GURL& url) override; | 42 void SetURL(const GURL& url) override; |
43 void Hide() override; | 43 void Hide() override; |
| 44 void Reposition() override; |
44 void MouseMoved(const gfx::Point& location, bool left_content) override; | 45 void MouseMoved(const gfx::Point& location, bool left_content) override; |
45 void UpdateDownloadShelfVisibility(bool visible) override; | 46 void UpdateDownloadShelfVisibility(bool visible) override; |
46 | 47 |
47 // Mac-specific method: Update the size and position of the status bubble to | 48 // Mac-specific method: Update the size and position of the status bubble to |
48 // match the parent window. Safe to call even when the status bubble does not | 49 // match the parent window. Safe to call even when the status bubble does not |
49 // exist. | 50 // exist. |
50 void UpdateSizeAndPosition(); | 51 void UpdateSizeAndPosition(); |
51 | 52 |
52 // Mac-specific method: Change the parent window of the status bubble. Safe to | 53 // Mac-specific method: Change the parent window of the status bubble. Safe to |
53 // call even when the status bubble does not exist. | 54 // call even when the status bubble does not exist. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 @interface NSObject(StatusBubbleDelegate) | 190 @interface NSObject(StatusBubbleDelegate) |
190 // Called to query the delegate about the frame StatusBubble should position | 191 // Called to query the delegate about the frame StatusBubble should position |
191 // itself in. Frame is returned in the parent window coordinates. | 192 // itself in. Frame is returned in the parent window coordinates. |
192 - (NSRect)statusBubbleBaseFrame; | 193 - (NSRect)statusBubbleBaseFrame; |
193 | 194 |
194 // Called from SetState to notify the delegate of state changes. | 195 // Called from SetState to notify the delegate of state changes. |
195 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; | 196 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; |
196 @end | 197 @end |
197 | 198 |
198 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 199 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
OLD | NEW |