| 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/ui/gtk/avatar_menu_bubble_gtk.h" | 8 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" |
| 9 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" | 9 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 10 #include "ui/gfx/gtk_util.h" | 10 #include "ui/gfx/gtk_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 gtk_misc_set_alignment(GTK_MISC(image_), 0.0, 1.0); | 36 gtk_misc_set_alignment(GTK_MISC(image_), 0.0, 1.0); |
| 37 gtk_widget_set_size_request(image_, -1, 0); | 37 gtk_widget_set_size_request(image_, -1, 0); |
| 38 } | 38 } |
| 39 | 39 |
| 40 gboolean AvatarMenuButtonGtk::OnButtonPressed(GtkWidget* widget, | 40 gboolean AvatarMenuButtonGtk::OnButtonPressed(GtkWidget* widget, |
| 41 GdkEventButton* event) { | 41 GdkEventButton* event) { |
| 42 if (event->button != 1) | 42 if (event->button != 1) |
| 43 return FALSE; | 43 return FALSE; |
| 44 | 44 |
| 45 new AvatarMenuBubbleGtk(browser_, widget, arrow_location_, NULL); | 45 ShowAvatarBubble(); |
| 46 return TRUE; | 46 return TRUE; |
| 47 } | 47 } |
| 48 |
| 49 void AvatarMenuButtonGtk::ShowAvatarBubble() { |
| 50 new AvatarMenuBubbleGtk(browser_, widget_.get(), arrow_location_, NULL); |
| 51 } |
| OLD | NEW |