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

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

Issue 8834010: Linux GTK: Support keyboard navigation in avatar menu. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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_ITEM_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 // Returns the root widget for this menu item. 45 // Returns the root widget for this menu item.
46 GtkWidget* widget() { return widget_.get(); } 46 GtkWidget* widget() { return widget_.get(); }
47 47
48 // content::NotificationObserver implementation. 48 // content::NotificationObserver implementation.
49 virtual void Observe(int type, 49 virtual void Observe(int type,
50 const content::NotificationSource& source, 50 const content::NotificationSource& source,
51 const content::NotificationDetails& details) OVERRIDE; 51 const content::NotificationDetails& details) OVERRIDE;
52 52
53 private: 53 private:
54
55 void ShowStatusLabel();
56 void ShowEditLink();
57
54 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileClick, 58 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileClick,
55 GdkEventButton*); 59 GdkEventButton*);
56 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileEnter, 60 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileEnter,
57 GdkEventCrossing*); 61 GdkEventCrossing*);
58 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileLeave, 62 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileLeave,
59 GdkEventCrossing*); 63 GdkEventCrossing*);
64 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileFocusIn,
65 GdkEventFocus*);
66 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileFocusOut,
67 GdkEventFocus*);
68 CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileKeyPress,
69 GdkEventKey*);
60 CHROMEGTK_CALLBACK_0(AvatarMenuItemGtk, void, OnEditProfileLinkClicked); 70 CHROMEGTK_CALLBACK_0(AvatarMenuItemGtk, void, OnEditProfileLinkClicked);
61 71
62 // Create all widgets in this menu item, using |theme_service|. 72 // Create all widgets in this menu item, using |theme_service|.
63 void Init(GtkThemeService* theme_service); 73 void Init(GtkThemeService* theme_service);
64 74
65 // A weak pointer to the item's delegate. 75 // A weak pointer to the item's delegate.
66 Delegate* delegate_; 76 Delegate* delegate_;
67 77
68 // Profile information to display for this item, e.g. user name, sync status. 78 // Profile information to display for this item, e.g. user name, sync status.
69 AvatarMenuModel::Item item_; 79 AvatarMenuModel::Item item_;
(...skipping 30 matching lines...) Expand all
100 const GdkColor* unhighlighted_color_; 110 const GdkColor* unhighlighted_color_;
101 111
102 base::WeakPtrFactory<AvatarMenuItemGtk> weak_factory_; 112 base::WeakPtrFactory<AvatarMenuItemGtk> weak_factory_;
103 113
104 content::NotificationRegistrar registrar_; 114 content::NotificationRegistrar registrar_;
105 115
106 DISALLOW_COPY_AND_ASSIGN(AvatarMenuItemGtk); 116 DISALLOW_COPY_AND_ASSIGN(AvatarMenuItemGtk);
107 }; 117 };
108 118
109 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_ 119 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc ('k') | chrome/browser/ui/gtk/avatar_menu_item_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698