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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm

Issue 163913011: [OSX, OmniTheatre] Handle OriginChip click properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 6 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 side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698