OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 // Called when the RenderViewHost of the hosted TabContents has changed, e.g. | 41 // Called when the RenderViewHost of the hosted TabContents has changed, e.g. |
42 // to show an interstitial page. | 42 // to show an interstitial page. |
43 void RenderViewHostChanged(RenderViewHost* old_host, | 43 void RenderViewHostChanged(RenderViewHost* old_host, |
44 RenderViewHost* new_host); | 44 RenderViewHost* new_host); |
45 | 45 |
46 // Called when a TabContents is destroyed. This gives us a chance to clean | 46 // Called when a TabContents is destroyed. This gives us a chance to clean |
47 // up our internal state if the TabContents is somehow destroyed before we | 47 // up our internal state if the TabContents is somehow destroyed before we |
48 // get notified. | 48 // get notified. |
49 void TabContentsDestroyed(TabContents* contents); | 49 void TabContentsDestroyed(TabContents* contents); |
50 | 50 |
| 51 // Called when |fixed_| changes sizes. Used to position the findbar. |
| 52 static void OnSizeAllocate(GtkWidget* fixed, |
| 53 GtkAllocation* allocation, |
| 54 TabContentsContainerGtk* contents_container); |
| 55 |
51 // The currently visible TabContents. | 56 // The currently visible TabContents. |
52 TabContents* tab_contents_; | 57 TabContents* tab_contents_; |
53 | 58 |
54 // We keep a GtkVBox which is inserted into this object's owner's GtkWidget | 59 // We keep a GtkVBox which is inserted into this object's owner's GtkWidget |
55 // hierarchy. We then insert and remove WebContents GtkWidgets into this | 60 // hierarchy. We then insert and remove WebContents GtkWidgets into this |
56 // vbox_. | 61 // vbox_. |
57 GtkWidget* vbox_; | 62 GtkWidget* vbox_; |
58 | 63 |
| 64 // This GtkFixed widget helps us position the find bar. |
| 65 GtkWidget* fixed_; |
| 66 |
| 67 // The findbar widget. We do not own it. |
| 68 GtkWidget* findbar_; |
| 69 |
59 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); | 70 DISALLOW_COPY_AND_ASSIGN(TabContentsContainerGtk); |
60 }; | 71 }; |
61 | 72 |
62 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ | 73 #endif // CHROME_BROWSER_GTK_TAB_CONTENTS_CONTAINER_GTK_H_ |
OLD | NEW |