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

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

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 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 16 matching lines...) Expand all
27 GtkWidget* widget() const { return widget_.get(); } 27 GtkWidget* widget() const { return widget_.get(); }
28 28
29 // Sets the location the arrow should be displayed on the menu bubble. 29 // Sets the location the arrow should be displayed on the menu bubble.
30 void set_menu_arrow_location(BubbleGtk::ArrowLocationGtk arrow_location) { 30 void set_menu_arrow_location(BubbleGtk::ArrowLocationGtk arrow_location) {
31 arrow_location_ = arrow_location; 31 arrow_location_ = arrow_location;
32 } 32 }
33 33
34 // Sets the image to display on the button, typically the profile icon. 34 // Sets the image to display on the button, typically the profile icon.
35 void SetIcon(const SkBitmap &icon); 35 void SetIcon(const SkBitmap &icon);
36 36
37 // Show the avatar bubble.
38 void ShowAvatarBubble();
39
37 private: 40 private:
38 CHROMEGTK_CALLBACK_1(AvatarMenuButtonGtk, gboolean, OnButtonPressed, 41 CHROMEGTK_CALLBACK_1(AvatarMenuButtonGtk, gboolean, OnButtonPressed,
39 GdkEventButton*); 42 GdkEventButton*);
40 43
41 // The button widget. 44 // The button widget.
42 ui::OwnedWidgetGtk widget_; 45 ui::OwnedWidgetGtk widget_;
43 46
44 // A weak pointer to the image widget displayed on the button. 47 // A weak pointer to the image widget displayed on the button.
45 GtkWidget* image_; 48 GtkWidget* image_;
46 49
47 // A weak pointer to a browser. Used to create the bubble menu. 50 // A weak pointer to a browser. Used to create the bubble menu.
48 Browser* browser_; 51 Browser* browser_;
49 52
50 // Which side of the bubble to display the arrow. 53 // Which side of the bubble to display the arrow.
51 BubbleGtk::ArrowLocationGtk arrow_location_; 54 BubbleGtk::ArrowLocationGtk arrow_location_;
52 55
53 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButtonGtk); 56 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButtonGtk);
54 }; 57 };
55 58
56 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_ 59 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUTTON_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/accelerators_gtk.cc ('k') | chrome/browser/ui/gtk/avatar_menu_button_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698