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

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

Issue 147163: GTK: Another attempt at fixing gtk_floating_container_forall() crasher. (Closed)
Patch Set: Created 11 years, 6 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
« no previous file with comments | « chrome/browser/gtk/tab_contents_container_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/gtk/tab_contents_container_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698