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

Unified Diff: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h

Issue 8402005: GTK: Fix profile selection bubble to match the chrome-theme when selected. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comment fix Created 9 years, 2 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h
diff --git a/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h b/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h
index a31addc5b9a7ef61bc732f8a7c4103d5256eb0a0..22e598233e048cfeed37931e145900c9ad984a2a 100644
--- a/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h
@@ -16,6 +16,8 @@
#include "chrome/browser/profiles/avatar_menu_model_observer.h"
#include "chrome/browser/ui/gtk/avatar_menu_item_gtk.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/gtk/gtk_signal.h"
class AvatarMenuModel;
@@ -26,7 +28,8 @@ class GtkThemeService;
// It displays a list of profiles and allows users to switch between profiles.
class AvatarMenuBubbleGtk : public BubbleDelegateGtk,
public AvatarMenuModelObserver,
- public AvatarMenuItemGtk::Delegate {
+ public AvatarMenuItemGtk::Delegate,
+ public content::NotificationObserver {
public:
AvatarMenuBubbleGtk(Browser* browser,
GtkWidget* anchor,
@@ -43,9 +46,13 @@ class AvatarMenuBubbleGtk : public BubbleDelegateGtk,
AvatarMenuModel* avatar_menu_model) OVERRIDE;
// AvatarMenuItemGtk::Delegate implementation.
- virtual void OpenProfile(size_t profile_index);
+ virtual void OpenProfile(size_t profile_index) OVERRIDE;
+ virtual void EditProfile(size_t profile_index) OVERRIDE;
- virtual void EditProfile(size_t profile_index);
+ // content::NotificationObserver implementation.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
private:
// Notified when |contents_| is destroyed so we can delete our instance.
@@ -69,6 +76,10 @@ class AvatarMenuBubbleGtk : public BubbleDelegateGtk,
// A weak pointer to the theme service.
GtkThemeService* theme_service_;
+ // A weak pointer to the new proifle link to keep its theme information
+ // updated.
+ GtkWidget* new_profile_link_;
+
// A vector of all profile items in the menu.
std::vector<AvatarMenuItemGtk*> items_;
@@ -76,6 +87,8 @@ class AvatarMenuBubbleGtk : public BubbleDelegateGtk,
// from automatically reducing its size when hovering over a profile item.
int minimum_width_;
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk);
};
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698