OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 // Creates a webview showing the gaia signin page. | 146 // Creates a webview showing the gaia signin page. |
147 views::View* CreateGaiaSigninView(); | 147 views::View* CreateGaiaSigninView(); |
148 | 148 |
149 // Creates a view to confirm account removal for |account_id_to_remove_|. | 149 // Creates a view to confirm account removal for |account_id_to_remove_|. |
150 views::View* CreateAccountRemovalView(); | 150 views::View* CreateAccountRemovalView(); |
151 | 151 |
152 // Removes the currently selected account and attempts to restart Chrome. | 152 // Removes the currently selected account and attempts to restart Chrome. |
153 void RemoveAccount(); | 153 void RemoveAccount(); |
154 | 154 |
| 155 // Close the tutorial card. |
| 156 void DismissTutorial(); |
| 157 |
155 // Creates a tutorial card to introduce an upgrade user to the new avatar | 158 // Creates a tutorial card to introduce an upgrade user to the new avatar |
156 // menu if needed. |tutorial_shown| indicates if the tutorial has already been | 159 // menu if needed. |tutorial_shown| indicates if the tutorial has already been |
157 // shown in the previous active view. |avatar_item| refers to the current | 160 // shown in the previous active view. |avatar_item| refers to the current |
158 // profile. | 161 // profile. |
159 views::View* CreateWelcomeUpgradeTutorialViewIfNeeded( | 162 views::View* CreateWelcomeUpgradeTutorialViewIfNeeded( |
160 bool tutorial_shown, const AvatarMenu::Item& avatar_item); | 163 bool tutorial_shown, const AvatarMenu::Item& avatar_item); |
161 | 164 |
162 // Creates a tutorial card to have the user confirm the last Chrome signin, | 165 // Creates a tutorial card to have the user confirm the last Chrome signin, |
163 // Chrome sync will be delayed until the user either dismisses the tutorial, | 166 // Chrome sync will be delayed until the user either dismisses the tutorial, |
164 // or configures sync through the "Settings" link. | 167 // or configures sync through the "Settings" link. |
165 views::View* CreateSigninConfirmationView(); | 168 views::View* CreateSigninConfirmationView(); |
166 | 169 |
167 // Creates a a tutorial card to show the errors in the last Chrome signin. | 170 // Creates a a tutorial card to show the errors in the last Chrome signin. |
168 views::View* CreateSigninErrorView(); | 171 views::View* CreateSigninErrorView(); |
169 | 172 |
170 // Creates a tutorial card with the specified |title_text|, |context_text|, | 173 // Creates a tutorial card. If |stack_button| is true, places the button above |
171 // and a bottom row with a right-aligned link using the specified |link_text|, | 174 // the link otherwise places both on the same row with the link left aligned |
172 // and a left aligned button using the specified |button_text|. The method | 175 // and button right aligned. The method sets |link| to point to the newly |
173 // sets |link| to point to the newly created link, |button| to the newly | 176 // create link, |button| to the newly created button, and |tutorial_mode_| to |
174 // created button, and |tutorial_mode_| to the given |tutorial_mode|. | 177 // the given |tutorial_mode|. |
175 views::View* CreateTutorialView( | 178 views::View* CreateTutorialView( |
176 profiles::TutorialMode tutorial_mode, | 179 profiles::TutorialMode tutorial_mode, |
177 const base::string16& title_text, | 180 const base::string16& title_text, |
178 const base::string16& content_text, | 181 const base::string16& content_text, |
179 const base::string16& link_text, | 182 const base::string16& link_text, |
180 const base::string16& button_text, | 183 const base::string16& button_text, |
| 184 bool stack_button, |
181 views::Link** link, | 185 views::Link** link, |
182 views::LabelButton** button); | 186 views::LabelButton** button, |
| 187 views::ImageButton** close_button); |
183 | 188 |
184 // Create a view that shows various options for an upgrade user who is not | 189 // Create a view that shows various options for an upgrade user who is not |
185 // the same person as the currently signed in user. | 190 // the same person as the currently signed in user. |
186 views::View* CreateSwitchUserView(); | 191 views::View* CreateSwitchUserView(); |
187 | 192 |
188 bool ShouldShowGoIncognito() const; | 193 bool ShouldShowGoIncognito() const; |
189 | 194 |
190 // Clean-up done after an action was performed in the ProfileChooser. | 195 // Clean-up done after an action was performed in the ProfileChooser. |
191 void PostActionPerformed(ProfileMetrics::ProfileDesktopMenu action_performed); | 196 void PostActionPerformed(ProfileMetrics::ProfileDesktopMenu action_performed); |
192 | 197 |
193 scoped_ptr<AvatarMenu> avatar_menu_; | 198 scoped_ptr<AvatarMenu> avatar_menu_; |
194 Browser* browser_; | 199 Browser* browser_; |
195 | 200 |
196 // Other profiles used in the "fast profile switcher" view. | 201 // Other profiles used in the "fast profile switcher" view. |
197 ButtonIndexes open_other_profile_indexes_map_; | 202 ButtonIndexes open_other_profile_indexes_map_; |
198 | 203 |
199 // Buttons associated with the current profile. | 204 // Buttons associated with the current profile. |
200 AccountButtonIndexes delete_account_button_map_; | 205 AccountButtonIndexes delete_account_button_map_; |
201 AccountButtonIndexes reauth_account_button_map_; | 206 AccountButtonIndexes reauth_account_button_map_; |
202 | 207 |
203 // Links and buttons displayed in the tutorial card. | 208 // Links and buttons displayed in the tutorial card. |
204 views::LabelButton* tutorial_sync_settings_ok_button_; | 209 views::LabelButton* tutorial_sync_settings_ok_button_; |
205 views::Link* tutorial_sync_settings_link_; | 210 views::Link* tutorial_sync_settings_link_; |
206 views::LabelButton* tutorial_see_whats_new_button_; | 211 views::LabelButton* tutorial_see_whats_new_button_; |
207 views::Link* tutorial_not_you_link_; | 212 views::Link* tutorial_not_you_link_; |
| 213 views::ImageButton* tutorial_close_button_; |
208 | 214 |
209 // Links and buttons displayed in the active profile card. | 215 // Links and buttons displayed in the active profile card. |
210 views::Link* manage_accounts_link_; | 216 views::Link* manage_accounts_link_; |
211 views::LabelButton* signin_current_profile_link_; | 217 views::LabelButton* signin_current_profile_link_; |
212 views::LabelButton* auth_error_email_button_; | 218 views::LabelButton* auth_error_email_button_; |
213 | 219 |
214 // The profile name and photo in the active profile card. Owned by the | 220 // The profile name and photo in the active profile card. Owned by the |
215 // views hierarchy. | 221 // views hierarchy. |
216 EditableProfilePhoto* current_profile_photo_; | 222 EditableProfilePhoto* current_profile_photo_; |
217 EditableProfileName* current_profile_name_; | 223 EditableProfileName* current_profile_name_; |
(...skipping 25 matching lines...) Expand all Loading... |
243 // The current tutorial mode. | 249 // The current tutorial mode. |
244 profiles::TutorialMode tutorial_mode_; | 250 profiles::TutorialMode tutorial_mode_; |
245 | 251 |
246 // The GAIA service type provided in the response header. | 252 // The GAIA service type provided in the response header. |
247 signin::GAIAServiceType gaia_service_type_; | 253 signin::GAIAServiceType gaia_service_type_; |
248 | 254 |
249 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); | 255 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); |
250 }; | 256 }; |
251 | 257 |
252 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ | 258 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ |
OLD | NEW |