| 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_STATUS_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_STATUS_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_STATUS_BUBBLE_H_ | 6 #define CHROME_BROWSER_STATUS_BUBBLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 class GURL; | 10 class GURL; |
| 11 namespace gfx { |
| 12 class Point; |
| 13 } |
| 11 | 14 |
| 12 //////////////////////////////////////////////////////////////////////////////// | 15 //////////////////////////////////////////////////////////////////////////////// |
| 13 // StatusBubble interface | 16 // StatusBubble interface |
| 14 // An interface implemented by an object providing the status display area of | 17 // An interface implemented by an object providing the status display area of |
| 15 // the browser window. | 18 // the browser window. |
| 16 // | 19 // |
| 17 class StatusBubble { | 20 class StatusBubble { |
| 18 public: | 21 public: |
| 19 virtual ~StatusBubble() {} | 22 virtual ~StatusBubble() {} |
| 20 | 23 |
| 21 // Sets the bubble contents to a specific string and causes the bubble | 24 // Sets the bubble contents to a specific string and causes the bubble |
| 22 // to display immediately. Subsequent empty SetURL calls (typically called | 25 // to display immediately. Subsequent empty SetURL calls (typically called |
| 23 // when the cursor exits a link) will set the status bubble back to its | 26 // when the cursor exits a link) will set the status bubble back to its |
| 24 // status text. To hide the status bubble again, either call SetStatus | 27 // status text. To hide the status bubble again, either call SetStatus |
| 25 // with an empty string, or call Hide(). | 28 // with an empty string, or call Hide(). |
| 26 virtual void SetStatus(const std::wstring& status) = 0; | 29 virtual void SetStatus(const std::wstring& status) = 0; |
| 27 | 30 |
| 28 // Sets the bubble text to a URL - if given a non-empty URL, this will cause | 31 // Sets the bubble text to a URL - if given a non-empty URL, this will cause |
| 29 // the bubble to fade in and remain open until given an empty URL or until | 32 // the bubble to fade in and remain open until given an empty URL or until |
| 30 // the Hide() method is called. languages is the value of Accept-Language | 33 // the Hide() method is called. languages is the value of Accept-Language |
| 31 // to determine what characters are understood by a user. | 34 // to determine what characters are understood by a user. |
| 32 virtual void SetURL(const GURL& url, const std::wstring& languages) = 0; | 35 virtual void SetURL(const GURL& url, const std::wstring& languages) = 0; |
| 33 | 36 |
| 34 // Skip the fade and instant-hide the bubble. | 37 // Skip the fade and instant-hide the bubble. |
| 35 virtual void Hide() = 0; | 38 virtual void Hide() = 0; |
| 36 | 39 |
| 37 // Called when the user's mouse has moved over web content. This is used to | 40 // Called when the user's mouse has moved over web content. This is used to |
| 38 // determine when the status area should move out of the way of the user's | 41 // determine when the status area should move out of the way of the user's |
| 39 // mouse. This may be windows specific pain due to the way messages are | 42 // mouse. This may be windows specific pain due to the way messages are |
| 40 // processed for child HWNDs. | 43 // processed for child HWNDs. |position| is the absolute position of the |
| 41 virtual void MouseMoved() = 0; | 44 // pointer, and |left_content| is true if the mouse just left the content |
| 45 // area. |
| 46 virtual void MouseMoved(const gfx::Point& position, bool left_content) = 0; |
| 42 | 47 |
| 43 // Called when the download shelf becomes visible or invisible. | 48 // Called when the download shelf becomes visible or invisible. |
| 44 // This is used by to ensure that the status bubble does not obscure | 49 // This is used by to ensure that the status bubble does not obscure |
| 45 // the download shelf, when it is visible. | 50 // the download shelf, when it is visible. |
| 46 virtual void UpdateDownloadShelfVisibility(bool visible) = 0; | 51 virtual void UpdateDownloadShelfVisibility(bool visible) = 0; |
| 47 }; | 52 }; |
| 48 | 53 |
| 49 #endif // CHROME_BROWSER_STATUS_BUBBLE_H_ | 54 #endif // CHROME_BROWSER_STATUS_BUBBLE_H_ |
| OLD | NEW |