Index: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
index 5150d6e47908d40f3030ab0c45525f816a149789..adbfc968ffcc27e7cd4a14c14494a66dca0a1330 100644 |
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
@@ -79,6 +79,8 @@ |
// a decoration area and get the expected selection behaviour, |
// likewise for multiple clicks in those areas. |
- (void)mouseDown:(NSEvent*)theEvent { |
+ // TODO(groby): Figure out if OnMouseDown needs to be postponed/skipped |
+ // for button decorations. |
if (observer_) |
observer_->OnMouseDown([theEvent buttonNumber]); |
@@ -368,11 +370,7 @@ |
// because the first responder will be immediately set to the field editor |
// when calling [super becomeFirstResponder], thus we won't receive |
// resignFirstResponder: anymore when losing focus. |
- if (observer_) { |
- NSEvent* theEvent = [NSApp currentEvent]; |
- const bool controlDown = ([theEvent modifierFlags]&NSControlKeyMask) != 0; |
- observer_->OnSetFocus(controlDown); |
- } |
+ [[self cell] handleFocusEvent:[NSApp currentEvent] ofView:self]; |
} |
return doAccept; |
} |