diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 22:55:21 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 22:55:21 +0000 |
commit | 97dc320a8fd7b25abbac5b35d6cc49111668416b (patch) | |
tree | 0e4ef92d4bc7a19d22bd9e15e2b04bd9e04ba0a6 /chrome/browser/gtk/status_bubble_gtk.h | |
parent | 01dbd931735c7b7497b7b83664462512f272bf58 (diff) | |
download | chromium_src-97dc320a8fd7b25abbac5b35d6cc49111668416b.zip chromium_src-97dc320a8fd7b25abbac5b35d6cc49111668416b.tar.gz chromium_src-97dc320a8fd7b25abbac5b35d6cc49111668416b.tar.bz2 |
GTK: Fix status bubble hiding during background tab events.
So the GTK version had only one status, setting the status to any URL the user hovered over. When the background tab is done with loading, it sends a SetStatus("") to the StatusBubble. This was what was tickling the bug.
So I'm copying the Windows implementation, which can have a URL and a status, with the URL's display overriding the status display. So when the background tab calls SetStatus(""), the URL should still be displayed.
http://crbug.com/14802
Review URL: http://codereview.chromium.org/147050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/status_bubble_gtk.h')
-rw-r--r-- | chrome/browser/gtk/status_bubble_gtk.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome/browser/gtk/status_bubble_gtk.h b/chrome/browser/gtk/status_bubble_gtk.h index 5de672b..006efd0 100644 --- a/chrome/browser/gtk/status_bubble_gtk.h +++ b/chrome/browser/gtk/status_bubble_gtk.h @@ -36,14 +36,16 @@ class StatusBubbleGtk : public StatusBubble { // the download shelf, when it is visible. virtual void UpdateDownloadShelfVisibility(bool visible) { } - void SetStatus(const std::string& status_utf8); - // Top of the widget hierarchy for a StatusBubble. This top level widget is // guarenteed to have its gtk_widget_name set to "status-bubble" for // identification. GtkWidget* widget() { return container_.get(); } private: + // Sets the text of the label widget and controls visibility. (As contrasted + // with setting the current status or URL text, which may be ignored for now). + void SetStatusTextTo(const std::string& status_utf8); + // Sets the status bubble's location in the parent GtkFixed, shows the widget // and makes sure that the status bubble has the highest z-order. void Show(); @@ -60,6 +62,12 @@ class StatusBubbleGtk : public StatusBubble { // The GtkLabel holding the text. GtkWidget* label_; + // The status text we want to display when there are no URLs to display. + std::string status_text_; + + // The url we want to display when there is no status text to display. + std::string url_text_; + // A timer that hides our window after a delay. ScopedRunnableMethodFactory<StatusBubbleGtk> timer_factory_; }; |