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

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

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build error Created 9 years, 1 month 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
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_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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_button_gtk.h ('k') | chrome/browser/ui/gtk/browser_titlebar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698