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

Side by Side Diff: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc

Issue 8889027: GTK: Fix crash on avatar bubble close (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
« no previous file with comments | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" 5 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/avatar_menu_model.h" 9 #include "chrome/browser/profiles/avatar_menu_model.h"
10 #include "chrome/browser/profiles/profile_info_cache.h" 10 #include "chrome/browser/profiles/profile_info_cache.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 theme_service_->InitThemesFor(this); 65 theme_service_->InitThemesFor(this);
66 } 66 }
67 67
68 AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() { 68 AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() {
69 STLDeleteContainerPointers(items_.begin(), items_.end()); 69 STLDeleteContainerPointers(items_.begin(), items_.end());
70 } 70 }
71 71
72 void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) { 72 void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) {
73 // We are self deleting, we have a destroy signal setup to catch when we 73 // We are self deleting, we have a destroy signal setup to catch when we
74 // destroyed (via the BubbleGtk being destroyed), and delete ourself. 74 // destroyed (via the BubbleGtk being destroyed), and delete ourself.
75 delete this; 75 MessageLoop::current()->DeleteSoon(FROM_HERE, this);
76 } 76 }
77 77
78 void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble, 78 void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble,
79 bool closed_by_escape) { 79 bool closed_by_escape) {
80 } 80 }
81 81
82 void AvatarMenuBubbleGtk::OnAvatarMenuModelChanged( 82 void AvatarMenuBubbleGtk::OnAvatarMenuModelChanged(
83 AvatarMenuModel* avatar_menu_model) { 83 AvatarMenuModel* avatar_menu_model) {
84 STLDeleteContainerPointers(items_.begin(), items_.end()); 84 STLDeleteContainerPointers(items_.begin(), items_.end());
85 items_.clear(); 85 items_.clear();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 g_signal_connect(new_profile_link_, "clicked", 154 g_signal_connect(new_profile_link_, "clicked",
155 G_CALLBACK(OnNewProfileLinkClickedThunk), this); 155 G_CALLBACK(OnNewProfileLinkClickedThunk), this);
156 156
157 GtkWidget* link_align = gtk_alignment_new(0, 0, 0, 0); 157 GtkWidget* link_align = gtk_alignment_new(0, 0, 0, 0);
158 gtk_alignment_set_padding(GTK_ALIGNMENT(link_align), 158 gtk_alignment_set_padding(GTK_ALIGNMENT(link_align),
159 0, 0, kNewProfileLinkLeftPadding, 0); 159 0, 0, kNewProfileLinkLeftPadding, 0);
160 gtk_container_add(GTK_CONTAINER(link_align), new_profile_link_); 160 gtk_container_add(GTK_CONTAINER(link_align), new_profile_link_);
161 161
162 gtk_box_pack_start(GTK_BOX(contents_), link_align, FALSE, FALSE, 0); 162 gtk_box_pack_start(GTK_BOX(contents_), link_align, FALSE, FALSE, 0);
163 } 163 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698