diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:22:34 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 19:22:34 +0000 |
commit | 3a69f0af0b98c8373fd6b5997ce37efd31baa8dd (patch) | |
tree | f954ec0d0c56a53b20fe27640a674698a96f28ff /chrome/browser/gtk/tab_contents_container_gtk.h | |
parent | 5beb105cef4ede484df49a02cfc7984ac053b225 (diff) | |
download | chromium_src-3a69f0af0b98c8373fd6b5997ce37efd31baa8dd.zip chromium_src-3a69f0af0b98c8373fd6b5997ce37efd31baa8dd.tar.gz chromium_src-3a69f0af0b98c8373fd6b5997ce37efd31baa8dd.tar.bz2 |
GTK: Implement GtkFloatingContainer and implement StatusBubble on top of it.
This introduces a hybrid GtkBin/GtkFixed container which exposes a signal to absolutely position widgets. This also fixes the current flickering issues with the status bubble.
http://crbug.com/11635
TEST=Goto a site with a long list of links (I used reddit.com) and move the mouse cursor up and down the list quickly. There shouldn't be flickering in the top left corner.
Review URL: http://codereview.chromium.org/115835
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tab_contents_container_gtk.h')
-rw-r--r-- | chrome/browser/gtk/tab_contents_container_gtk.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.h b/chrome/browser/gtk/tab_contents_container_gtk.h index 457748c..d6df96c 100644 --- a/chrome/browser/gtk/tab_contents_container_gtk.h +++ b/chrome/browser/gtk/tab_contents_container_gtk.h @@ -14,11 +14,15 @@ class RenderViewHost; class StatusBubbleGtk; class TabContents; +typedef struct _GtkFloatingContainer GtkFloatingContainer; + class TabContentsContainerGtk : public NotificationObserver { public: explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble); ~TabContentsContainerGtk(); + void Init(); + // Inserts our GtkWidget* hierarchy into a GtkBox managed by our owner. void AddContainerToBox(GtkWidget* widget); @@ -58,6 +62,12 @@ class TabContentsContainerGtk : public NotificationObserver { GtkAllocation* allocation, TabContentsContainerGtk* container); + // Handler for |floating_|'s "set-floating-position" signal. During this + // callback, we manually set the position of the status bubble. + static void OnSetFloatingPosition( + GtkFloatingContainer* container, GtkAllocation* allocation, + TabContentsContainerGtk* tab_contents_container); + NotificationRegistrar registrar_; // The currently visible TabContents. @@ -66,13 +76,16 @@ class TabContentsContainerGtk : public NotificationObserver { // The status bubble manager. Always non-NULL. StatusBubbleGtk* status_bubble_; - // We keep a GtkFixed which is inserted into this object's owner's GtkWidget - // hierarchy. We then insert and remove TabContents GtkWidgets into this - // fixed_. This should not be a GtkVBox since there were errors with timing - // where the vbox was horizontally split with the top half displaying the - // current TabContents and bottom half displaying the loading page. In - // addition, we need to position the status bubble on top of the currently - // displayed TabContents so we put that in this part of the hierarchy. + // Top of the TabContentsContainerGtk widget hierarchy. A cross between a + // GtkBin and a GtkFixed, |floating_| has |fixed_| as its one "real" child, + // and the various things that hang off the bottom (status bubble, etc) have + // their positions manually set in OnSetFloatingPosition. + GtkWidget* floating_; + + // We insert and remove TabContents GtkWidgets into this fixed_. This should + // not be a GtkVBox since there were errors with timing where the vbox was + // horizontally split with the top half displaying the current TabContents + // and bottom half displaying the loading page. GtkWidget* fixed_; DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); |