| Index: chrome/browser/ui/gtk/avatar_menu_item_gtk.h
|
| diff --git a/chrome/browser/ui/gtk/avatar_menu_item_gtk.h b/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
|
| index 62ff3782a52d87ca9767f8b45f9ce87b73b84525..6cfef490497a6b46d6fb35dea784e37d8c4e9d05 100644
|
| --- a/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
|
| +++ b/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
|
| @@ -10,6 +10,8 @@
|
|
|
| #include "base/memory/weak_ptr.h"
|
| #include "chrome/browser/profiles/avatar_menu_model.h"
|
| +#include "content/public/browser/notification_observer.h"
|
| +#include "content/public/browser/notification_registrar.h"
|
| #include "ui/base/gtk/gtk_signal.h"
|
| #include "ui/base/gtk/owned_widget_gtk.h"
|
|
|
| @@ -19,7 +21,7 @@ class GtkThemeService;
|
| // to be displayed in the AvatarMenuBubble. Clicking the profile will open a new
|
| // browser window, and when the user hovers over an active profile item, a link
|
| // is displayed that will allow editing the profile.
|
| -class AvatarMenuItemGtk {
|
| +class AvatarMenuItemGtk : public content::NotificationObserver {
|
| public:
|
| // Delegates opening or editing a profile.
|
| class Delegate {
|
| @@ -43,6 +45,11 @@ class AvatarMenuItemGtk {
|
| // Returns the root widget for this menu item.
|
| GtkWidget* widget() { return widget_.get(); }
|
|
|
| + // content::NotificationObserver implementation.
|
| + virtual void Observe(int type,
|
| + const content::NotificationSource& source,
|
| + const content::NotificationDetails& details) OVERRIDE;
|
| +
|
| private:
|
| CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileClick,
|
| GdkEventButton*);
|
| @@ -68,6 +75,9 @@ class AvatarMenuItemGtk {
|
| // The root widget for this menu item.
|
| ui::OwnedWidgetGtk widget_;
|
|
|
| + // Provides colors.
|
| + GtkThemeService* theme_service_;
|
| +
|
| // A weak pointer to a label that displays the sync status. It is not shown
|
| // when the user is hovering over the item if the profile is the active
|
| // profile.
|
| @@ -77,7 +87,23 @@ class AvatarMenuItemGtk {
|
| // when the user is hovering over the active profile.
|
| GtkWidget* link_alignment_;
|
|
|
| + // A weak pointer to a GtkChromeLinkButton so we can keep the use_gtk_theme
|
| + // property up to date.
|
| + GtkWidget* edit_profile_link_;
|
| +
|
| + // The highlighted color. Depending on the theme, this is either |widget|'s
|
| + // bg[GTK_STATE_SELECTED] or a static highlight.
|
| + GdkColor highlighted_color_;
|
| +
|
| + // The unhighlighted color. Depending on the theme, this is either NULL or a
|
| + // pointer to static data.
|
| + const GdkColor* unhighlighted_color_;
|
| +
|
| base::WeakPtrFactory<AvatarMenuItemGtk> weak_factory_;
|
| +
|
| + content::NotificationRegistrar registrar_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(AvatarMenuItemGtk);
|
| };
|
|
|
| #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_
|
|
|