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

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

Issue 2306673003: Material Page Info (Views, 3/3): Update site settings section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 3 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 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)

Powered by Google App Engine
This is Rietveld 408576698