Index: chrome/browser/gtk/tab_contents_container_gtk.cc |
diff --git a/chrome/browser/gtk/tab_contents_container_gtk.cc b/chrome/browser/gtk/tab_contents_container_gtk.cc |
index 41d2d9ace47d542c3f9ac3fca87ff1121a3ff9d1..d55f9ca066bfef4c50275b330b5994cd6699ce43 100644 |
--- a/chrome/browser/gtk/tab_contents_container_gtk.cc |
+++ b/chrome/browser/gtk/tab_contents_container_gtk.cc |
@@ -34,6 +34,7 @@ TabContentsContainerGtk::TabContentsContainerGtk(StatusBubbleGtk* status_bubble) |
} |
TabContentsContainerGtk::~TabContentsContainerGtk() { |
+ floating_.Destroy(); |
} |
void TabContentsContainerGtk::Init() { |
@@ -45,29 +46,29 @@ void TabContentsContainerGtk::Init() { |
// || || |
// || || |
// || || |
- // |+- (StatusBubble) ------+ +- (Popups) ------------+| |
- // |+ +----------------+ || |
- // |+-----------------------+ +-----------------------+| |
+ // |+- (StatusBubble) ------+ || |
+ // |+ + || |
+ // |+-----------------------+----------------------------------------+| |
// +------------------------------------------------------------------+ |
- floating_ = gtk_floating_container_new(); |
+ floating_.Own(gtk_floating_container_new()); |
fixed_ = gtk_fixed_new(); |
g_signal_connect(fixed_, "size-allocate", |
G_CALLBACK(OnFixedSizeAllocate), this); |
- gtk_container_add(GTK_CONTAINER(floating_), fixed_); |
+ gtk_container_add(GTK_CONTAINER(floating_.get()), fixed_); |
- gtk_floating_container_add_floating(GTK_FLOATING_CONTAINER(floating_), |
+ gtk_floating_container_add_floating(GTK_FLOATING_CONTAINER(floating_.get()), |
status_bubble_->widget()); |
- g_signal_connect(floating_, "set-floating-position", |
+ g_signal_connect(floating_.get(), "set-floating-position", |
G_CALLBACK(OnSetFloatingPosition), this); |
gtk_widget_show(fixed_); |
- gtk_widget_show(floating_); |
+ gtk_widget_show(floating_.get()); |
} |
void TabContentsContainerGtk::AddContainerToBox(GtkWidget* box) { |
- gtk_box_pack_start(GTK_BOX(box), floating_, TRUE, TRUE, 0); |
+ gtk_box_pack_start(GTK_BOX(box), floating_.get(), TRUE, TRUE, 0); |
} |
void TabContentsContainerGtk::SetTabContents(TabContents* tab_contents) { |