diff --git a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm index 0d00e35932598..8d38013f5f7b6 100644 --- a/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm +++ b/chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm @@ -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 @@ -554,6 +546,10 @@ - (void)setHoverState:(HoverState)state { [changePhotoImage_ setHidden:([self hoverState] == kHoverStateNone)]; } +- (BOOL)canBecomeKeyView { + return false; +} + - (BOOL)accessibilityIsIgnored { return NO; } @@ -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. diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc index de9adf615ca2e..a0f2a32748472 100644 --- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc +++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc @@ -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. @@ -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.