Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Win, Mac] Skip the profile editing fields from the tabbing loop.
Browse files Browse the repository at this point in the history
This will make the first tab go to the:
- Switch Person button for signed in profiles
- the authentication error button for signed in profiles with an error
- the "sign in" button for local profiles

BUG=414794

Review URL: https://codereview.chromium.org/605323002

Cr-Commit-Position: refs/heads/master@{#297561}
  • Loading branch information
notwaldorf authored and Commit bot committed Oct 1, 2014
1 parent 5d8e6e2 commit df6e287
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,7 @@ - (void)drawWithFrame:(NSRect)frame inView:(NSView *)controlView {
// Display everything as a circle that spans the entire control.
NSBezierPath* path = [NSBezierPath bezierPathWithOvalInRect:frame];
[path addClip];

[super drawImage:[self image] withFrame:frame inView:controlView];

// Focus ring.
if ([self showsFirstResponder]) {
[[[NSColor keyboardFocusIndicatorColor] colorWithAlphaComponent:1] set];
[path setLineWidth:kFocusRingLineWidth];
[path stroke];
}
}
@end

Expand Down Expand Up @@ -554,6 +546,10 @@ - (void)setHoverState:(HoverState)state {
[changePhotoImage_ setHidden:([self hoverState] == kHoverStateNone)];
}

- (BOOL)canBecomeKeyView {
return false;
}

- (BOOL)accessibilityIsIgnored {
return NO;
}
Expand Down Expand Up @@ -691,6 +687,10 @@ - (void)showEditableView:(id)sender {
[[self window] makeFirstResponder:profileNameTextField_];
}

- (BOOL)canBecomeKeyView {
return false;
}

@end

// A custom button that allows for setting a background color when hovered over.
Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/ui/views/profiles/profile_chooser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ class EditableProfilePhoto : public views::LabelButton {
return;
}

SetFocusable(true);
set_notify_enter_exit_on_child(true);

// Photo overlay that appears when hovering over the button.
Expand Down Expand Up @@ -315,7 +314,6 @@ class EditableProfileName : public RightAlignedIconLabelButton,
return;
}

SetFocusable(true);
// Show an "edit" pencil icon when hovering over. In the default state,
// we need to create an empty placeholder of the correct size, so that
// the text doesn't jump around when the hovered icon appears.
Expand Down

0 comments on commit df6e287

Please sign in to comment.