Chromium Code Reviews| 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 3b227f8bdecad182ef65e690c9565ee36011aa79..2b68af5582a59bf47a20868dde4f9ca0e46d1596 100644 |
| --- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
| +++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.mm |
| @@ -513,12 +513,21 @@ const CGFloat kAnimationDuration = 0.2; |
| // TODO(viettrungluu): crbug.com/30809 -- this is a hack since it steals focus |
| // and doesn't return it. |
| [[self window] makeFirstResponder:self]; |
| - return [dropHandler_ draggingEntered:sender]; |
| + |
| + bool canDropAtLocation = |
|
msw
2016/09/30 00:37:04
Is this from a bad rebase?
lgarron
2016/09/30 05:05:56
Yes, sorry.
(I recently switched to using depende
|
| + [[self cell] canDropAtLocationInWindow:[sender draggingLocation] |
| + ofView:self]; |
| + return canDropAtLocation ? [dropHandler_ draggingEntered:sender] |
| + : NSDragOperationNone; |
| } |
| // (URLDropTarget protocol) |
| - (NSDragOperation)draggingUpdated:(id<NSDraggingInfo>)sender { |
| - return [dropHandler_ draggingUpdated:sender]; |
| + bool canDropAtLocation = |
| + [[self cell] canDropAtLocationInWindow:[sender draggingLocation] |
| + ofView:self]; |
| + return canDropAtLocation ? [dropHandler_ draggingUpdated:sender] |
| + : NSDragOperationNone; |
| } |
| // (URLDropTarget protocol) |