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

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view.h

Issue 2023093002: Reflow of the profile items in desktop user menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-profile-icon
Patch Set: Minor comments Created 4 years, 5 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
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // the existing bubble will auto-close due to focus loss. 59 // the existing bubble will auto-close due to focus loss.
60 static void ShowBubble( 60 static void ShowBubble(
61 profiles::BubbleViewMode view_mode, 61 profiles::BubbleViewMode view_mode,
62 profiles::TutorialMode tutorial_mode, 62 profiles::TutorialMode tutorial_mode,
63 const signin::ManageAccountsParams& manage_accounts_params, 63 const signin::ManageAccountsParams& manage_accounts_params,
64 signin_metrics::AccessPoint access_point, 64 signin_metrics::AccessPoint access_point,
65 views::View* anchor_view, 65 views::View* anchor_view,
66 Browser* browser); 66 Browser* browser);
67 static bool IsShowing(); 67 static bool IsShowing();
68 static void Hide(); 68 static void Hide();
69 static int GetFixedMenuWidth();
Evan Stade 2016/06/30 14:36:45 this doesn't need to be public. I'd just make it a
Jane 2016/06/30 14:47:34 Done.
69 70
70 private: 71 private:
71 friend class ProfileChooserViewExtensionsTest; 72 friend class ProfileChooserViewExtensionsTest;
72 73
73 typedef std::vector<size_t> Indexes; 74 typedef std::vector<size_t> Indexes;
74 typedef std::map<views::Button*, int> ButtonIndexes; 75 typedef std::map<views::Button*, int> ButtonIndexes;
75 typedef std::map<views::Button*, std::string> AccountButtonIndexes; 76 typedef std::map<views::Button*, std::string> AccountButtonIndexes;
76 77
77 ProfileChooserView(views::View* anchor_view, 78 ProfileChooserView(views::View* anchor_view,
78 Browser* browser, 79 Browser* browser,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // bubble, options buttons, tutorials). 142 // bubble, options buttons, tutorials).
142 void PopulateCompleteProfileChooserView(views::GridLayout* layout, 143 void PopulateCompleteProfileChooserView(views::GridLayout* layout,
143 AvatarMenu* avatar_menu); 144 AvatarMenu* avatar_menu);
144 145
145 // Creates the main profile card for the profile |avatar_item|. |is_guest| 146 // Creates the main profile card for the profile |avatar_item|. |is_guest|
146 // is used to determine whether to show any Sign in/Sign out/Manage accounts 147 // is used to determine whether to show any Sign in/Sign out/Manage accounts
147 // links. 148 // links.
148 views::View* CreateCurrentProfileView( 149 views::View* CreateCurrentProfileView(
149 const AvatarMenu::Item& avatar_item, 150 const AvatarMenu::Item& avatar_item,
150 bool is_guest); 151 bool is_guest);
152 views::View* CreateMaterialDesignCurrentProfileView(
153 const AvatarMenu::Item& avatar_item,
154 bool is_guest);
151 views::View* CreateGuestProfileView(); 155 views::View* CreateGuestProfileView();
152 views::View* CreateOtherProfilesView(const Indexes& avatars_to_show); 156 views::View* CreateOtherProfilesView(const Indexes& avatars_to_show);
153 views::View* CreateOptionsView(bool display_lock, AvatarMenu* avatar_menu); 157 views::View* CreateOptionsView(bool display_lock, AvatarMenu* avatar_menu);
154 views::View* CreateSupervisedUserDisclaimerView(); 158 views::View* CreateSupervisedUserDisclaimerView();
155 159
156 // Account Management view for the profile |avatar_item|. 160 // Account Management view for the profile |avatar_item|.
157 views::View* CreateCurrentProfileAccountsView( 161 views::View* CreateCurrentProfileAccountsView(
158 const AvatarMenu::Item& avatar_item); 162 const AvatarMenu::Item& avatar_item);
159 void CreateAccountButton(views::GridLayout* layout, 163 void CreateAccountButton(views::GridLayout* layout,
160 const std::string& account_id, 164 const std::string& account_id,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Links and buttons displayed in the tutorial card. 234 // Links and buttons displayed in the tutorial card.
231 views::LabelButton* tutorial_sync_settings_ok_button_; 235 views::LabelButton* tutorial_sync_settings_ok_button_;
232 views::Link* tutorial_sync_settings_link_; 236 views::Link* tutorial_sync_settings_link_;
233 views::LabelButton* tutorial_see_whats_new_button_; 237 views::LabelButton* tutorial_see_whats_new_button_;
234 views::Link* tutorial_not_you_link_; 238 views::Link* tutorial_not_you_link_;
235 views::Link* tutorial_learn_more_link_; 239 views::Link* tutorial_learn_more_link_;
236 views::ImageButton* tutorial_close_button_; 240 views::ImageButton* tutorial_close_button_;
237 241
238 // Links and buttons displayed in the active profile card. 242 // Links and buttons displayed in the active profile card.
239 views::Link* manage_accounts_link_; 243 views::Link* manage_accounts_link_;
240 views::LabelButton* signin_current_profile_link_; 244 views::LabelButton* signin_current_profile_button_;
241 views::LabelButton* auth_error_email_button_; 245 views::LabelButton* auth_error_email_button_;
242 246
243 // The profile name and photo in the active profile card. Owned by the 247 // The profile name and photo in the active profile card. Owned by the
244 // views hierarchy. 248 // views hierarchy.
245 EditableProfilePhoto* current_profile_photo_; 249 EditableProfilePhoto* current_profile_photo_;
246 EditableProfileName* current_profile_name_; 250 EditableProfileName* current_profile_name_;
247 251
248 // Action buttons. 252 // Action buttons.
249 views::LabelButton* guest_profile_button_; 253 views::LabelButton* guest_profile_button_;
250 views::LabelButton* users_button_; 254 views::LabelButton* users_button_;
(...skipping 26 matching lines...) Expand all
277 // The GAIA service type provided in the response header. 281 // The GAIA service type provided in the response header.
278 signin::GAIAServiceType gaia_service_type_; 282 signin::GAIAServiceType gaia_service_type_;
279 283
280 // The current access point of sign in. 284 // The current access point of sign in.
281 const signin_metrics::AccessPoint access_point_; 285 const signin_metrics::AccessPoint access_point_;
282 286
283 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); 287 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView);
284 }; 288 };
285 289
286 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ 290 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698