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

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

Issue 507022: Fix issue 11258: Linux: gracefully handle small browser window... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | Annotate | Revision Log
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 |expanded_| 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 and remove TabContents GtkWidgets into this expanded_. This
91 // not be a GtkVBox since there were errors with timing where the vbox was 82 // should not be a GtkVBox since there were errors with timing where the vbox
92 // horizontally split with the top half displaying the current TabContents 83 // was horizontally split with the top half displaying the current TabContents
93 // and bottom half displaying the loading page. 84 // and bottom half displaying the loading page.
94 GtkWidget* fixed_; 85 GtkWidget* expanded_;
95 86
96 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); 87 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk);
97 }; 88 };
98 89
99 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ 90 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/slide_animator_gtk.cc ('k') | chrome/browser/gtk/tab_contents_container_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698