| 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 | 28 |
| 28 private: | 29 private: |
| 29 friend class StatusBubbleMacTest; | 30 friend class StatusBubbleMacTest; |
| 30 | 31 |
| 31 void SetStatus(NSString* status, bool is_url); | 32 void SetStatus(NSString* status, bool is_url); |
| 32 | 33 |
| 33 // 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 |
| 34 // it does.) | 35 // it does.) |
| 35 void Create(); | 36 void Create(); |
| 36 | 37 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 47 NSString* status_text_; | 48 NSString* status_text_; |
| 48 | 49 |
| 49 // 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. |
| 50 NSString* url_text_; | 51 NSString* url_text_; |
| 51 | 52 |
| 52 // How vertically offset the bubble is from its root position. | 53 // How vertically offset the bubble is from its root position. |
| 53 int offset_; | 54 int offset_; |
| 54 }; | 55 }; |
| 55 | 56 |
| 56 #endif // #ifndef CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ | 57 #endif // #ifndef CHROME_BROWSER_COCOA_STATUS_BUBBLE_MAC_H_ |
| OLD | NEW |