summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tab_contents_container_gtk.h
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 23:30:27 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-19 23:30:27 +0000
commit98f5ea69fed3f2f39646acdffd76baeac4a6a7df (patch)
treee6f4525d1daf154b650df2c503a5d52445a3eecb /chrome/browser/gtk/tab_contents_container_gtk.h
parentfd81a10dc199076671eab98cc5722522004a84d5 (diff)
downloadchromium_src-98f5ea69fed3f2f39646acdffd76baeac4a6a7df.zip
chromium_src-98f5ea69fed3f2f39646acdffd76baeac4a6a7df.tar.gz
chromium_src-98f5ea69fed3f2f39646acdffd76baeac4a6a7df.tar.bz2
Quick reimplementation of StatusBubbleGtk to not suck as much.
The TabContentsContainerGtk now uses a GtkFixed to store its children, and the status bubble is now a child of that GtkFixed so that it can be absolutely positioned on top of the rendered data. Since it is no longer a GTK_WINDOW_POPUP, all the weird stuff related to different window managers goes away. http://crbug.com/11635 Review URL: http://codereview.chromium.org/113590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16433 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.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.h b/chrome/browser/gtk/tab_contents_container_gtk.h
index 1cb72e5..8915b67 100644
--- a/chrome/browser/gtk/tab_contents_container_gtk.h
+++ b/chrome/browser/gtk/tab_contents_container_gtk.h
@@ -11,11 +11,12 @@
#include "chrome/common/notification_observer.h"
class RenderViewHost;
+class StatusBubbleGtk;
class TabContents;
class TabContentsContainerGtk : public NotificationObserver {
public:
- TabContentsContainerGtk();
+ explicit TabContentsContainerGtk(StatusBubbleGtk* status_bubble);
~TabContentsContainerGtk();
// Inserts our GtkWidget* hierarchy into a GtkBox managed by our owner.
@@ -48,13 +49,29 @@ class TabContentsContainerGtk : public NotificationObserver {
// get notified.
void TabContentsDestroyed(TabContents* contents);
+ // Implements our hack around a GtkFixed. The entire size of the GtkFixed is
+ // allocated to normal tab contents views, while the status bubble is
+ // informed of its parent and its parent's allocation (it makes a decision
+ // about layout later.)
+ static void OnFixedSizeAllocate(
+ GtkWidget* fixed,
+ GtkAllocation* allocation,
+ TabContentsContainerGtk* container);
+
// The currently visible TabContents.
TabContents* tab_contents_;
- // We keep a GtkVBox which is inserted into this object's owner's GtkWidget
+ // 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
- // vbox_.
- GtkWidget* vbox_;
+ // 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.
+ GtkWidget* fixed_;
DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk);
};