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

Unified Diff: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc

Issue 8370021: Make avatar menu bubble as singleton and destroy all the menu items and menu model when bubble cl... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 2 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/ui/gtk/avatar_menu_bubble_gtk.h ('k') | chrome/browser/ui/gtk/avatar_menu_item_gtk.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc
===================================================================
--- chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc (revision 106832)
+++ chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc (working copy)
@@ -54,12 +54,20 @@
true, // |grab_input|
theme_service_,
this); // |delegate|
+ g_signal_connect(contents_, "destroy",
+ G_CALLBACK(&OnDestroyThunk), this);
}
AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() {
STLDeleteContainerPointers(items_.begin(), items_.end());
}
+void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) {
+ // We are self deleting, we have a destroy signal setup to catch when we
+ // destroyed (via the BubbleGtk being destroyed), and delete ourself.
+ delete this;
+}
+
void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble,
bool closed_by_escape) {
}
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h ('k') | chrome/browser/ui/gtk/avatar_menu_item_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698