| Index: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| index caac7e85b636c9820ddf40ac024d3837bbee4bf5..25bd35d396fbd94dcfc8df9981c7fe8d4e584f9d 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
|
| @@ -1594,7 +1594,11 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
|
| showLock = item.signed_in &&
|
| profiles::IsLockAvailable(browser_->profile());
|
| } else {
|
| - [otherProfiles addObject:[self createOtherProfileView:i]];
|
| + NSButton* otherProfileView = [self createOtherProfileView:i];
|
| + if (!firstProfileView_) {
|
| + firstProfileView_ = otherProfileView;
|
| + }
|
| + [otherProfiles addObject:otherProfileView];
|
| }
|
| }
|
| if (!currentProfileView) // Guest windows don't have an active profile.
|
| @@ -2945,4 +2949,12 @@ class ActiveProfileObserverBridge : public AvatarMenuObserver,
|
| return incognitoAvailable && !browser_->profile()->IsGuestSession();
|
| }
|
|
|
| +- (void)showWindow:(id)sender {
|
| + [super showWindow:sender];
|
| + NSEvent *event = [[NSApplication sharedApplication] currentEvent];
|
| + if (firstProfileView_ && [event type] == NSKeyDown) {
|
| + [[self window] makeFirstResponder:firstProfileView_];
|
| + }
|
| +}
|
| +
|
| @end
|
|
|