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

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

Issue 10337010: Revert r123782. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BUBBLE_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include <gtk/gtk.h> 11 #include <gtk/gtk.h>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "chrome/browser/profiles/avatar_menu_model_observer.h" 16 #include "chrome/browser/profiles/avatar_menu_model_observer.h"
17 #include "chrome/browser/ui/gtk/avatar_menu_item_gtk.h" 17 #include "chrome/browser/ui/gtk/avatar_menu_item_gtk.h"
18 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 18 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
19 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
20 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
21 #include "ui/base/gtk/gtk_signal.h" 21 #include "ui/base/gtk/gtk_signal.h"
22 22
23 class AvatarMenuModel; 23 class AvatarMenuModel;
24 class Browser; 24 class Browser;
25 class ThemeServiceGtk; 25 class GtkThemeService;
26 26
27 // This bubble is displayed when the user clicks on the avatar button. 27 // This bubble is displayed when the user clicks on the avatar button.
28 // It displays a list of profiles and allows users to switch between profiles. 28 // It displays a list of profiles and allows users to switch between profiles.
29 class AvatarMenuBubbleGtk : public BubbleDelegateGtk, 29 class AvatarMenuBubbleGtk : public BubbleDelegateGtk,
30 public AvatarMenuModelObserver, 30 public AvatarMenuModelObserver,
31 public AvatarMenuItemGtk::Delegate, 31 public AvatarMenuItemGtk::Delegate,
32 public content::NotificationObserver { 32 public content::NotificationObserver {
33 public: 33 public:
34 AvatarMenuBubbleGtk(Browser* browser, 34 AvatarMenuBubbleGtk(Browser* browser,
35 GtkWidget* anchor, 35 GtkWidget* anchor,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // A model of all the profile information to be displayed in the menu. 70 // A model of all the profile information to be displayed in the menu.
71 scoped_ptr<AvatarMenuModel> avatar_menu_model_; 71 scoped_ptr<AvatarMenuModel> avatar_menu_model_;
72 72
73 // A weak pointer to the parent widget of all widgets in the bubble. 73 // A weak pointer to the parent widget of all widgets in the bubble.
74 GtkWidget* contents_; 74 GtkWidget* contents_;
75 75
76 // A weak pointer to the bubble window. 76 // A weak pointer to the bubble window.
77 BubbleGtk* bubble_; 77 BubbleGtk* bubble_;
78 78
79 // A weak pointer to the theme service. 79 // A weak pointer to the theme service.
80 ThemeServiceGtk* theme_service_; 80 GtkThemeService* theme_service_;
81 81
82 // A weak pointer to the new proifle link to keep its theme information 82 // A weak pointer to the new proifle link to keep its theme information
83 // updated. 83 // updated.
84 GtkWidget* new_profile_link_; 84 GtkWidget* new_profile_link_;
85 85
86 // A vector of all profile items in the menu. 86 // A vector of all profile items in the menu.
87 std::vector<AvatarMenuItemGtk*> items_; 87 std::vector<AvatarMenuItemGtk*> items_;
88 88
89 // The minimum width to display the bubble. This is used to prevent the bubble 89 // The minimum width to display the bubble. This is used to prevent the bubble
90 // from automatically reducing its size when hovering over a profile item. 90 // from automatically reducing its size when hovering over a profile item.
91 int minimum_width_; 91 int minimum_width_;
92 92
93 content::NotificationRegistrar registrar_; 93 content::NotificationRegistrar registrar_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk); 95 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk);
96 }; 96 };
97 97
98 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ 98 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service_factory.cc ('k') | chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698