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

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

Issue 2687693002: Linux/Windows: Setting focus to the first profile in profile switcher (Closed)
Patch Set: Renaming |focus_first_profile| to |is_source_keyboard| Created 3 years, 10 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // make a button toggle the bubble on and off when clicked: we unconditionally 52 // make a button toggle the bubble on and off when clicked: we unconditionally
53 // call this function when the button is clicked and if the bubble isn't 53 // call this function when the button is clicked and if the bubble isn't
54 // showing it will appear while if it is showing, nothing will happen here and 54 // showing it will appear while if it is showing, nothing will happen here and
55 // the existing bubble will auto-close due to focus loss. 55 // the existing bubble will auto-close due to focus loss.
56 static void ShowBubble( 56 static void ShowBubble(
57 profiles::BubbleViewMode view_mode, 57 profiles::BubbleViewMode view_mode,
58 profiles::TutorialMode tutorial_mode, 58 profiles::TutorialMode tutorial_mode,
59 const signin::ManageAccountsParams& manage_accounts_params, 59 const signin::ManageAccountsParams& manage_accounts_params,
60 signin_metrics::AccessPoint access_point, 60 signin_metrics::AccessPoint access_point,
61 views::View* anchor_view, 61 views::View* anchor_view,
62 Browser* browser); 62 Browser* browser,
63 bool is_source_keyboard);
63 static bool IsShowing(); 64 static bool IsShowing();
64 static void Hide(); 65 static void Hide();
65 66
66 const Browser* browser() const { return browser_; } 67 const Browser* browser() const { return browser_; }
67 68
68 private: 69 private:
69 friend class ProfileChooserViewExtensionsTest; 70 friend class ProfileChooserViewExtensionsTest;
70 71
71 typedef std::vector<size_t> Indexes; 72 typedef std::vector<size_t> Indexes;
72 typedef std::map<views::Button*, int> ButtonIndexes; 73 typedef std::map<views::Button*, int> ButtonIndexes;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Tests set this to "false" for more consistent operation. 121 // Tests set this to "false" for more consistent operation.
121 static bool close_on_deactivate_for_testing_; 122 static bool close_on_deactivate_for_testing_;
122 123
123 void ResetView(); 124 void ResetView();
124 125
125 // Shows the bubble with the |view_to_display|. 126 // Shows the bubble with the |view_to_display|.
126 void ShowView(profiles::BubbleViewMode view_to_display, 127 void ShowView(profiles::BubbleViewMode view_to_display,
127 AvatarMenu* avatar_menu); 128 AvatarMenu* avatar_menu);
128 void ShowViewFromMode(profiles::BubbleViewMode mode); 129 void ShowViewFromMode(profiles::BubbleViewMode mode);
129 130
131 // Focuses the first profile button in the menu list.
132 void FocusFirstProfileButton();
133
130 // Creates the profile chooser view. 134 // Creates the profile chooser view.
131 views::View* CreateProfileChooserView(AvatarMenu* avatar_menu); 135 views::View* CreateProfileChooserView(AvatarMenu* avatar_menu);
132 136
133 // Populates |layout| with only a list of the profiles available to 137 // Populates |layout| with only a list of the profiles available to
134 // switch to. 138 // switch to.
135 void PopulateMinimalProfileChooserView(views::GridLayout* layout, 139 void PopulateMinimalProfileChooserView(views::GridLayout* layout,
136 AvatarMenu* avatar_menu); 140 AvatarMenu* avatar_menu);
137 141
138 // Populates |layout| with all the elements of the Avatar Menu (current user 142 // Populates |layout| with all the elements of the Avatar Menu (current user
139 // bubble, options buttons, tutorials). 143 // bubble, options buttons, tutorials).
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 258
255 // The profile name and photo in the active profile card in non-material- 259 // The profile name and photo in the active profile card in non-material-
256 // design user menu. Owned by the views hierarchy. 260 // design user menu. Owned by the views hierarchy.
257 EditableProfilePhoto* current_profile_photo_; 261 EditableProfilePhoto* current_profile_photo_;
258 EditableProfileName* current_profile_name_; 262 EditableProfileName* current_profile_name_;
259 // For material design user menu, the active profile card owns the profile 263 // For material design user menu, the active profile card owns the profile
260 // name and photo. 264 // name and photo.
261 views::LabelButton* current_profile_card_; 265 views::LabelButton* current_profile_card_;
262 266
263 // Action buttons. 267 // Action buttons.
268 views::LabelButton* first_profile_button_;
264 views::LabelButton* guest_profile_button_; 269 views::LabelButton* guest_profile_button_;
265 views::LabelButton* users_button_; 270 views::LabelButton* users_button_;
266 views::LabelButton* go_incognito_button_; 271 views::LabelButton* go_incognito_button_;
267 views::LabelButton* lock_button_; 272 views::LabelButton* lock_button_;
268 views::LabelButton* close_all_windows_button_; 273 views::LabelButton* close_all_windows_button_;
269 views::Link* add_account_link_; 274 views::Link* add_account_link_;
270 275
271 // Buttons displayed in the gaia signin view. 276 // Buttons displayed in the gaia signin view.
272 views::ImageButton* gaia_signin_cancel_button_; 277 views::ImageButton* gaia_signin_cancel_button_;
273 278
(...skipping 18 matching lines...) Expand all
292 // The GAIA service type provided in the response header. 297 // The GAIA service type provided in the response header.
293 signin::GAIAServiceType gaia_service_type_; 298 signin::GAIAServiceType gaia_service_type_;
294 299
295 // The current access point of sign in. 300 // The current access point of sign in.
296 const signin_metrics::AccessPoint access_point_; 301 const signin_metrics::AccessPoint access_point_;
297 302
298 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView); 303 DISALLOW_COPY_AND_ASSIGN(ProfileChooserView);
299 }; 304 };
300 305
301 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_ 306 #endif // CHROME_BROWSER_UI_VIEWS_PROFILES_PROFILE_CHOOSER_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698