OLD | NEW |
---|---|
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_button_gtk.h" | 5 #include "chrome/browser/ui/gtk/avatar_menu_button_gtk.h" |
6 | 6 |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "chrome/browser/profiles/profile_metrics.h" | 8 #include "chrome/browser/profiles/profile_metrics.h" |
9 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" | 9 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" |
10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 GdkEventButton* event) { | 42 GdkEventButton* event) { |
43 if (event->button != 1) | 43 if (event->button != 1) |
44 return FALSE; | 44 return FALSE; |
45 | 45 |
46 ShowAvatarBubble(); | 46 ShowAvatarBubble(); |
47 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); | 47 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); |
48 return TRUE; | 48 return TRUE; |
49 } | 49 } |
50 | 50 |
51 void AvatarMenuButtonGtk::ShowAvatarBubble() { | 51 void AvatarMenuButtonGtk::ShowAvatarBubble() { |
52 new AvatarMenuBubbleGtk(browser_, widget_.get(), arrow_location_, NULL); | 52 if (gtk_widget_get_parent_window(widget_.get())) |
James Hawkins
2011/12/01 17:15:55
This isn't the same logic as ShouldDisplayAvatar()
sail
2011/12/01 19:12:23
I think this is ok. ShoudDisplayAvatar decides if
| |
53 new AvatarMenuBubbleGtk(browser_, widget_.get(), arrow_location_, NULL); | |
53 } | 54 } |
OLD | NEW |