| 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_STATUS_BUBBLE_H_ | 5 #ifndef CHROME_BROWSER_UI_STATUS_BUBBLE_H_ |
| 6 #define CHROME_BROWSER_UI_STATUS_BUBBLE_H_ | 6 #define CHROME_BROWSER_UI_STATUS_BUBBLE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Sets the bubble contents to a specific string and causes the bubble | 29 // Sets the bubble contents to a specific string and causes the bubble |
| 30 // to display immediately. Subsequent empty SetURL calls (typically called | 30 // to display immediately. Subsequent empty SetURL calls (typically called |
| 31 // when the cursor exits a link) will set the status bubble back to its | 31 // when the cursor exits a link) will set the status bubble back to its |
| 32 // status text. To hide the status bubble again, either call SetStatus | 32 // status text. To hide the status bubble again, either call SetStatus |
| 33 // with an empty string, or call Hide(). | 33 // with an empty string, or call Hide(). |
| 34 virtual void SetStatus(const base::string16& status) = 0; | 34 virtual void SetStatus(const base::string16& status) = 0; |
| 35 | 35 |
| 36 // Sets the bubble text to a URL - if given a non-empty URL, this will cause | 36 // Sets the bubble text to a URL - if given a non-empty URL, this will cause |
| 37 // the bubble to fade in and remain open until given an empty URL or until | 37 // the bubble to fade in and remain open until given an empty URL or until |
| 38 // the Hide() method is called. languages is the value of Accept-Language | 38 // the Hide() method is called. |
| 39 // to determine what characters are understood by a user. | 39 virtual void SetURL(const GURL& url) = 0; |
| 40 virtual void SetURL(const GURL& url, const std::string& languages) = 0; | |
| 41 | 40 |
| 42 // Skip the fade and instant-hide the bubble. | 41 // Skip the fade and instant-hide the bubble. |
| 43 virtual void Hide() = 0; | 42 virtual void Hide() = 0; |
| 44 | 43 |
| 45 // Called when the user's mouse has moved over web content. This is used to | 44 // Called when the user's mouse has moved over web content. This is used to |
| 46 // determine when the status area should move out of the way of the user's | 45 // determine when the status area should move out of the way of the user's |
| 47 // mouse. |position| is the absolute position of the pointer, and | 46 // mouse. |position| is the absolute position of the pointer, and |
| 48 // |left_content| is true if the mouse just left the content area. | 47 // |left_content| is true if the mouse just left the content area. |
| 49 virtual void MouseMoved(const gfx::Point& position, bool left_content) = 0; | 48 virtual void MouseMoved(const gfx::Point& position, bool left_content) = 0; |
| 50 | 49 |
| 51 // Called when the download shelf becomes visible or invisible. | 50 // Called when the download shelf becomes visible or invisible. |
| 52 // This is used by to ensure that the status bubble does not obscure | 51 // This is used by to ensure that the status bubble does not obscure |
| 53 // the download shelf, when it is visible. | 52 // the download shelf, when it is visible. |
| 54 virtual void UpdateDownloadShelfVisibility(bool visible) = 0; | 53 virtual void UpdateDownloadShelfVisibility(bool visible) = 0; |
| 55 }; | 54 }; |
| 56 | 55 |
| 57 #endif // CHROME_BROWSER_UI_STATUS_BUBBLE_H_ | 56 #endif // CHROME_BROWSER_UI_STATUS_BUBBLE_H_ |
| OLD | NEW |