Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7889)

Unified Diff: chrome/browser/gtk/tab_contents_container_gtk.h

Issue 113590: Quick reimplementation of StatusBubbleGtk to not suck as much. (Closed)
Patch Set: (git cl uploads dirty tree state!?) Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/tab_contents_container_gtk.h
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.h b/chrome/browser/gtk/tab_contents_container_gtk.h
index 1cb72e509e08f91c29d70c7c47300846b8cc30a8..8915b67d16781fa61dbaf3447ce2d194778f0acb 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);
};

Powered by Google App Engine
This is Rietveld 408576698