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

Side by Side Diff: chrome/browser/profiles/avatar_menu.h

Issue 33753002: Sooper experimental refactoring of the profile info cache. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month 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
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_PROFILES_AVATAR_MENU_H_ 5 #ifndef CHROME_BROWSER_PROFILES_AVATAR_MENU_H_
6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ 6 #define CHROME_BROWSER_PROFILES_AVATAR_MENU_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool signin_required; 58 bool signin_required;
59 59
60 // Whether or not the current profile is a managed user 60 // Whether or not the current profile is a managed user
61 // (see ManagedUserService). 61 // (see ManagedUserService).
62 bool managed; 62 bool managed;
63 63
64 // The index in the menu of this profile, used by views to refer to 64 // The index in the menu of this profile, used by views to refer to
65 // profiles. 65 // profiles.
66 size_t menu_index; 66 size_t menu_index;
67 67
68 // The index in the |profile_cache| for this profile. 68 // The path where this profile is located.
69 size_t profile_index; 69 base::FilePath profile_path;
70 }; 70 };
71 71
72 // Constructor. |observer| can be NULL. |browser| can be NULL and a new one 72 // Constructor. |observer| can be NULL. |browser| can be NULL and a new one
73 // will be created if an action requires it. 73 // will be created if an action requires it.
74 AvatarMenu(ProfileInfoInterface* profile_cache, 74 AvatarMenu(ProfileInfoInterface* profile_cache,
75 AvatarMenuObserver* observer, 75 AvatarMenuObserver* observer,
76 Browser* browser); 76 Browser* browser);
77 virtual ~AvatarMenu(); 77 virtual ~AvatarMenu();
78 78
79 // True if avatar menu should be displayed. 79 // True if avatar menu should be displayed.
(...skipping 25 matching lines...) Expand all
105 105
106 // Rebuilds the menu from the cache. 106 // Rebuilds the menu from the cache.
107 void RebuildMenu(); 107 void RebuildMenu();
108 108
109 // Gets the number of profiles. 109 // Gets the number of profiles.
110 size_t GetNumberOfItems() const; 110 size_t GetNumberOfItems() const;
111 111
112 // Gets the Item at the specified index. 112 // Gets the Item at the specified index.
113 const Item& GetItemAt(size_t index) const; 113 const Item& GetItemAt(size_t index) const;
114 114
115 // Returns the index of the active profile. 115 // Returns the item representing of the active profile.
116 size_t GetActiveProfileIndex(); 116 const Item& GetActiveProfileItem() const;
117 117
118 // Returns information about a managed user which will be displayed in the 118 // Returns information about a managed user which will be displayed in the
119 // avatar menu. If the profile does not belong to a managed user, an empty 119 // avatar menu. If the profile does not belong to a managed user, an empty
120 // string will be returned. 120 // string will be returned.
121 base::string16 GetManagedUserInformation() const; 121 base::string16 GetManagedUserInformation() const;
122 122
123 // Returns the icon for the managed user which will be displayed in the 123 // Returns the icon for the managed user which will be displayed in the
124 // avatar menu. 124 // avatar menu.
125 const gfx::Image& GetManagedUserIcon() const; 125 const gfx::Image& GetManagedUserIcon() const;
126 126
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // Browser in which this avatar menu resides. Weak. 161 // Browser in which this avatar menu resides. Weak.
162 Browser* browser_; 162 Browser* browser_;
163 163
164 // Listens for notifications from the ProfileInfoCache. 164 // Listens for notifications from the ProfileInfoCache.
165 content::NotificationRegistrar registrar_; 165 content::NotificationRegistrar registrar_;
166 166
167 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); 167 DISALLOW_COPY_AND_ASSIGN(AvatarMenu);
168 }; 168 };
169 169
170 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ 170 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/notifications/message_center_settings_controller.cc ('k') | chrome/browser/profiles/avatar_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698