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 #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 Loading... |
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 Loading... |
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_ |
OLD | NEW |