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

Side by Side Diff: chrome/browser/gtk/tab_contents_container_gtk.h

Issue 354018: Convert tabcontentscontainer to use a vbox instead of a fixed. The (Closed)
Patch Set: Created 11 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/tab_contents_container_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_
6 #define CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ 6 #define CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Called when the RenderViewHost of the hosted TabContents has changed, e.g. 51 // Called when the RenderViewHost of the hosted TabContents has changed, e.g.
52 // to show an interstitial page. 52 // to show an interstitial page.
53 void RenderViewHostChanged(RenderViewHost* old_host, 53 void RenderViewHostChanged(RenderViewHost* old_host,
54 RenderViewHost* new_host); 54 RenderViewHost* new_host);
55 55
56 // Called when a TabContents is destroyed. This gives us a chance to clean 56 // Called when a TabContents is destroyed. This gives us a chance to clean
57 // up our internal state if the TabContents is somehow destroyed before we 57 // up our internal state if the TabContents is somehow destroyed before we
58 // get notified. 58 // get notified.
59 void TabContentsDestroyed(TabContents* contents); 59 void TabContentsDestroyed(TabContents* contents);
60 60
61 // Implements our hack around a GtkFixed. The entire size of the GtkFixed is
62 // allocated to normal tab contents views, while the status bubble is
63 // informed of its parent and its parent's allocation (it makes a decision
64 // about layout later.)
65 static void OnFixedSizeAllocate(
66 GtkWidget* fixed,
67 GtkAllocation* allocation,
68 TabContentsContainerGtk* container);
69
70 // Handler for |floating_|'s "set-floating-position" signal. During this 61 // Handler for |floating_|'s "set-floating-position" signal. During this
71 // callback, we manually set the position of the status bubble. 62 // callback, we manually set the position of the status bubble.
72 static void OnSetFloatingPosition( 63 static void OnSetFloatingPosition(
73 GtkFloatingContainer* container, GtkAllocation* allocation, 64 GtkFloatingContainer* container, GtkAllocation* allocation,
74 TabContentsContainerGtk* tab_contents_container); 65 TabContentsContainerGtk* tab_contents_container);
75 66
76 NotificationRegistrar registrar_; 67 NotificationRegistrar registrar_;
77 68
78 // The currently visible TabContents. 69 // The currently visible TabContents.
79 TabContents* tab_contents_; 70 TabContents* tab_contents_;
80 71
81 // The status bubble manager. Always non-NULL. 72 // The status bubble manager. Always non-NULL.
82 StatusBubbleGtk* status_bubble_; 73 StatusBubbleGtk* status_bubble_;
83 74
84 // Top of the TabContentsContainerGtk widget hierarchy. A cross between a 75 // Top of the TabContentsContainerGtk widget hierarchy. A cross between a
85 // GtkBin and a GtkFixed, |floating_| has |fixed_| as its one "real" child, 76 // GtkBin and a GtkFixed, |floating_| has |fixed_| as its one "real" child,
86 // and the various things that hang off the bottom (status bubble, etc) have 77 // and the various things that hang off the bottom (status bubble, etc) have
87 // their positions manually set in OnSetFloatingPosition. 78 // their positions manually set in OnSetFloatingPosition.
88 OwnedWidgetGtk floating_; 79 OwnedWidgetGtk floating_;
89 80
90 // We insert and remove TabContents GtkWidgets into this fixed_. This should 81 // We insert TabContentsViewGtks into this container_. We only show one
91 // not be a GtkVBox since there were errors with timing where the vbox was 82 // TabVontentsViewGtk at a time, so we can use a vbox or an hbox.
92 // horizontally split with the top half displaying the current TabContents 83 GtkWidget* container_;
93 // and bottom half displaying the loading page.
94 GtkWidget* fixed_;
95 84
96 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); 85 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk);
97 }; 86 };
98 87
99 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ 88 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/tab_contents_container_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698