[email protected] | feb3cf7 | 2009-01-22 22:57:19 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_STATUS_BUBBLE_H_ |
| 6 | #define CHROME_BROWSER_STATUS_BUBBLE_H_ |
| 7 | |
[email protected] | 51096b3 | 2009-01-22 23:09:44 | [diff] [blame] | 8 | #include <string> |
| 9 | |
[email protected] | feb3cf7 | 2009-01-22 22:57:19 | [diff] [blame] | 10 | class GURL; |
| 11 | |
| 12 | //////////////////////////////////////////////////////////////////////////////// |
| 13 | // StatusBubble interface |
| 14 | // An interface implemented by an object providing the status display area of |
| 15 | // the browser window. |
| 16 | // |
| 17 | class StatusBubble { |
| 18 | public: |
[email protected] | c9b0cbd | 2009-04-13 12:53:03 | [diff] [blame] | 19 | virtual ~StatusBubble() { }; |
| 20 | |
[email protected] | feb3cf7 | 2009-01-22 22:57:19 | [diff] [blame] | 21 | // Sets the bubble contents to a specific string and causes the bubble |
| 22 | // to display immediately. Subsequent empty SetURL calls (typically called |
| 23 | // 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 |
| 25 | // with an empty string, or call Hide(). |
| 26 | virtual void SetStatus(const std::wstring& status) = 0; |
| 27 | |
| 28 | // 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 |
| 30 | // the Hide() method is called. languages is the value of Accept-Language |
| 31 | // to determine what characters are understood by a user. |
| 32 | virtual void SetURL(const GURL& url, const std::wstring& languages) = 0; |
| 33 | |
| 34 | // Skip the fade and instant-hide the bubble. |
| 35 | virtual void Hide() = 0; |
| 36 | |
| 37 | // 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 |
| 39 | // mouse. This may be windows specific pain due to the way messages are |
| 40 | // processed for child HWNDs. |
| 41 | virtual void MouseMoved() = 0; |
| 42 | }; |
| 43 | |
[email protected] | be06a75b | 2009-02-19 03:37:12 | [diff] [blame] | 44 | #endif // #ifndef CHROME_BROWSER_STATUS_BUBBLE_H_ |