OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_COCOA_STATUS_BUBBLE_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ |
6 #define CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ | 6 #define CHROME_BROWSER_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> |
11 | 11 |
12 #include "chrome/browser/status_bubble.h" | 12 #include "chrome/browser/status_bubble.h" |
13 | 13 |
14 class GURL; | 14 class GURL; |
15 class StatusBubbleMacTest; | 15 class StatusBubbleMacTest; |
16 | 16 |
17 class StatusBubbleMac : public StatusBubble { | 17 class StatusBubbleMac : public StatusBubble { |
18 public: | 18 public: |
19 StatusBubbleMac(NSWindow* parent); | 19 StatusBubbleMac(NSWindow* parent); |
20 virtual ~StatusBubbleMac(); | 20 virtual ~StatusBubbleMac(); |
21 | 21 |
22 // StatusBubble implementation. | 22 // StatusBubble implementation. |
23 virtual void SetStatus(const std::wstring& status); | 23 virtual void SetStatus(const std::wstring& status); |
24 virtual void SetURL(const GURL& url, const std::wstring& languages); | 24 virtual void SetURL(const GURL& url, const std::wstring& languages); |
25 virtual void Hide(); | 25 virtual void Hide(); |
26 virtual void MouseMoved(); | 26 virtual void MouseMoved(); |
27 virtual void UpdateDownloadShelfVisibility(bool visible); | 27 virtual void UpdateDownloadShelfVisibility(bool visible); |
28 virtual void SetBubbleWidth(int width); | |
29 | 28 |
30 private: | 29 private: |
31 friend class StatusBubbleMacTest; | 30 friend class StatusBubbleMacTest; |
32 | 31 |
33 void SetStatus(NSString* status, bool is_url); | 32 void SetStatus(NSString* status, bool is_url); |
34 | 33 |
35 // Construct the window/widget if it does not already exist. (Safe to call if | 34 // Construct the window/widget if it does not already exist. (Safe to call if |
36 // it does.) | 35 // it does.) |
37 void Create(); | 36 void Create(); |
38 | 37 |
(...skipping 10 matching lines...) Expand all Loading... |
49 NSString* status_text_; | 48 NSString* status_text_; |
50 | 49 |
51 // The url we want to display when there is no status text to display. | 50 // The url we want to display when there is no status text to display. |
52 NSString* url_text_; | 51 NSString* url_text_; |
53 | 52 |
54 // How vertically offset the bubble is from its root position. | 53 // How vertically offset the bubble is from its root position. |
55 int offset_; | 54 int offset_; |
56 }; | 55 }; |
57 | 56 |
58 #endif // #ifndef CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ | 57 #endif // #ifndef CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ |
OLD | NEW |