OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // A string representing the sync state of the profile. | 50 // A string representing the sync state of the profile. |
51 base::string16 sync_state; | 51 base::string16 sync_state; |
52 | 52 |
53 // Whether or not the current profile is signed in. If true, |sync_state| is | 53 // Whether or not the current profile is signed in. If true, |sync_state| is |
54 // expected to be the email of the signed in user. | 54 // expected to be the email of the signed in user. |
55 bool signed_in; | 55 bool signed_in; |
56 | 56 |
57 // Whether or not the current profile requires sign-in before use. | 57 // Whether or not the current profile requires sign-in before use. |
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 supervised user |
61 // (see ManagedUserService). | 61 // (see ManagedUserService). |
62 bool managed; | 62 bool supervised; |
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 index in the |profile_cache| for this profile. |
69 size_t profile_index; | 69 size_t profile_index; |
70 | 70 |
71 // The path of this profile. | 71 // The path of this profile. |
72 base::FilePath profile_path; | 72 base::FilePath profile_path; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Gets the number of profiles. | 111 // Gets the number of profiles. |
112 size_t GetNumberOfItems() const; | 112 size_t GetNumberOfItems() const; |
113 | 113 |
114 // Gets the Item at the specified index. | 114 // Gets the Item at the specified index. |
115 const Item& GetItemAt(size_t index) const; | 115 const Item& GetItemAt(size_t index) const; |
116 | 116 |
117 // Returns the index of the active profile. | 117 // Returns the index of the active profile. |
118 size_t GetActiveProfileIndex(); | 118 size_t GetActiveProfileIndex(); |
119 | 119 |
120 // Returns information about a managed user which will be displayed in the | 120 // Returns information about a supervised user which will be displayed in the |
121 // avatar menu. If the profile does not belong to a managed user, an empty | 121 // avatar menu. If the profile does not belong to a supervised user, an empty |
122 // string will be returned. | 122 // string will be returned. |
123 base::string16 GetManagedUserInformation() const; | 123 base::string16 GetSupervisedUserInformation() const; |
124 | 124 |
125 // Returns the icon for the managed user which will be displayed in the | 125 // Returns the icon for the supervised user which will be displayed in the |
126 // avatar menu. | 126 // avatar menu. |
127 const gfx::Image& GetManagedUserIcon() const; | 127 const gfx::Image& GetSupervisedUserIcon() const; |
128 | 128 |
129 // This menu is also used for the always-present Mac system menubar. If the | 129 // This menu is also used for the always-present Mac system menubar. If the |
130 // last active browser changes, the menu will need to reference that browser. | 130 // last active browser changes, the menu will need to reference that browser. |
131 void ActiveBrowserChanged(Browser* browser); | 131 void ActiveBrowserChanged(Browser* browser); |
132 | 132 |
133 // Returns true if the add profile link should be shown. | 133 // Returns true if the add profile link should be shown. |
134 bool ShouldShowAddNewProfileLink() const; | 134 bool ShouldShowAddNewProfileLink() const; |
135 | 135 |
136 // Returns true if the edit profile link should be shown. | 136 // Returns true if the edit profile link should be shown. |
137 bool ShouldShowEditProfileLink() const; | 137 bool ShouldShowEditProfileLink() const; |
(...skipping 19 matching lines...) Expand all Loading... |
157 // Browser in which this avatar menu resides. Weak. | 157 // Browser in which this avatar menu resides. Weak. |
158 Browser* browser_; | 158 Browser* browser_; |
159 | 159 |
160 // Listens for notifications from the ProfileInfoCache. | 160 // Listens for notifications from the ProfileInfoCache. |
161 content::NotificationRegistrar registrar_; | 161 content::NotificationRegistrar registrar_; |
162 | 162 |
163 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); | 163 DISALLOW_COPY_AND_ASSIGN(AvatarMenu); |
164 }; | 164 }; |
165 | 165 |
166 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ | 166 #endif // CHROME_BROWSER_PROFILES_AVATAR_MENU_H_ |
OLD | NEW |