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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... | |
29 kBubbleShowingFadeIn, // In a fade-in transition | 29 kBubbleShowingFadeIn, // In a fade-in transition |
30 kBubbleShown, // Fully visible | 30 kBubbleShown, // Fully visible |
31 kBubbleHidingTimer, // Waiting to fade out | 31 kBubbleHidingTimer, // Waiting to fade out |
32 kBubbleHidingFadeOut // In a fade-out transition | 32 kBubbleHidingFadeOut // In a fade-out transition |
33 }; | 33 }; |
34 | 34 |
35 StatusBubbleMac(NSWindow* parent, id delegate); | 35 StatusBubbleMac(NSWindow* parent, id delegate); |
36 virtual ~StatusBubbleMac(); | 36 virtual ~StatusBubbleMac(); |
37 | 37 |
38 // StatusBubble implementation. | 38 // StatusBubble implementation. |
39 virtual void SetStatus(const string16& status); | 39 virtual void SetStatus(const string16& status); |
tony
2011/08/22 16:31:02
While you're here, can you add OVERRIDE to these v
tfarina
2011/08/22 17:08:25
Done.
| |
40 virtual void SetURL(const GURL& url, const string16& languages); | 40 virtual void SetURL(const GURL& url, const std::string& languages); |
41 virtual void Hide(); | 41 virtual void Hide(); |
42 virtual void MouseMoved(const gfx::Point& location, bool left_content); | 42 virtual void MouseMoved(const gfx::Point& location, bool left_content); |
43 virtual void UpdateDownloadShelfVisibility(bool visible); | 43 virtual void UpdateDownloadShelfVisibility(bool visible); |
44 | 44 |
45 // Mac-specific method: Update the size and position of the status bubble to | 45 // Mac-specific method: Update the size and position of the status bubble to |
46 // match the parent window. Safe to call even when the status bubble does not | 46 // match the parent window. Safe to call even when the status bubble does not |
47 // exist. | 47 // exist. |
48 void UpdateSizeAndPosition(); | 48 void UpdateSizeAndPosition(); |
49 | 49 |
50 // Mac-specific method: Change the parent window of the status bubble. Safe to | 50 // Mac-specific method: Change the parent window of the status bubble. Safe to |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 // True if the status bubble has been expanded. If the bubble is in the | 167 // True if the status bubble has been expanded. If the bubble is in the |
168 // expanded state and encounters a new URL, change size immediately, | 168 // expanded state and encounters a new URL, change size immediately, |
169 // with no hover delay. | 169 // with no hover delay. |
170 bool is_expanded_; | 170 bool is_expanded_; |
171 | 171 |
172 // The original, non-elided URL. | 172 // The original, non-elided URL. |
173 GURL url_; | 173 GURL url_; |
174 | 174 |
175 // Needs to be passed to ElideURL if the original URL string is wider than | 175 // Needs to be passed to ElideURL if the original URL string is wider than |
176 // the standard bubble width. | 176 // the standard bubble width. |
177 string16 languages_; | 177 std::string languages_; |
178 | 178 |
179 DISALLOW_COPY_AND_ASSIGN(StatusBubbleMac); | 179 DISALLOW_COPY_AND_ASSIGN(StatusBubbleMac); |
180 }; | 180 }; |
181 | 181 |
182 // Delegate interface | 182 // Delegate interface |
183 @interface NSObject(StatusBubbleDelegate) | 183 @interface NSObject(StatusBubbleDelegate) |
184 // Called to query the delegate about the frame StatusBubble should position | 184 // Called to query the delegate about the frame StatusBubble should position |
185 // itself in. Frame is returned in the parent window coordinates. | 185 // itself in. Frame is returned in the parent window coordinates. |
186 - (NSRect)statusBubbleBaseFrame; | 186 - (NSRect)statusBubbleBaseFrame; |
187 | 187 |
188 // Called from SetState to notify the delegate of state changes. | 188 // Called from SetState to notify the delegate of state changes. |
189 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; | 189 - (void)statusBubbleWillEnterState:(StatusBubbleMac::StatusBubbleState)state; |
190 @end | 190 @end |
191 | 191 |
192 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ | 192 #endif // CHROME_BROWSER_UI_COCOA_STATUS_BUBBLE_MAC_H_ |
OLD | NEW |