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