OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 this); // |delegate| | 61 this); // |delegate| |
62 g_signal_connect(contents_, "destroy", | 62 g_signal_connect(contents_, "destroy", |
63 G_CALLBACK(&OnDestroyThunk), this); | 63 G_CALLBACK(&OnDestroyThunk), this); |
64 } | 64 } |
65 | 65 |
66 AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() {} | 66 AvatarMenuBubbleGtk::~AvatarMenuBubbleGtk() {} |
67 | 67 |
68 void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) { | 68 void AvatarMenuBubbleGtk::OnDestroy(GtkWidget* widget) { |
69 // We are self deleting, we have a destroy signal setup to catch when we | 69 // We are self deleting, we have a destroy signal setup to catch when we |
70 // destroyed (via the BubbleGtk being destroyed), and delete ourself. | 70 // destroyed (via the BubbleGtk being destroyed), and delete ourself. |
71 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 71 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
72 } | 72 } |
73 | 73 |
74 void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble, | 74 void AvatarMenuBubbleGtk::BubbleClosing(BubbleGtk* bubble, |
75 bool closed_by_escape) { | 75 bool closed_by_escape) { |
76 bubble_ = NULL; | 76 bubble_ = NULL; |
77 } | 77 } |
78 | 78 |
79 void AvatarMenuBubbleGtk::OnAvatarMenuModelChanged( | 79 void AvatarMenuBubbleGtk::OnAvatarMenuModelChanged( |
80 AvatarMenuModel* avatar_menu_model) { | 80 AvatarMenuModel* avatar_menu_model) { |
81 items_.clear(); | 81 items_.clear(); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 gtk_box_pack_start(GTK_BOX(contents_), link_align, FALSE, FALSE, 0); | 160 gtk_box_pack_start(GTK_BOX(contents_), link_align, FALSE, FALSE, 0); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 void AvatarMenuBubbleGtk::CloseBubble() { | 164 void AvatarMenuBubbleGtk::CloseBubble() { |
165 if (bubble_) { | 165 if (bubble_) { |
166 bubble_->Close(); | 166 bubble_->Close(); |
167 bubble_ = NULL; | 167 bubble_ = NULL; |
168 } | 168 } |
169 } | 169 } |
OLD | NEW |