| Index: chrome/browser/cocoa/url_drop_target.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/url_drop_target.mm (revision 35037)
|
| +++ chrome/browser/cocoa/url_drop_target.mm (working copy)
|
| @@ -9,6 +9,9 @@
|
|
|
| @interface URLDropTargetHandler(Private)
|
|
|
| +// Get the window controller.
|
| +- (id<URLDropTargetWindowController>)windowController;
|
| +
|
| // Gets the appropriate drag operation given the |NSDraggingInfo|.
|
| - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender;
|
|
|
| @@ -44,8 +47,7 @@
|
| NSDragOperation dragOp = [self getDragOperation:sender];
|
| if (dragOp == NSDragOperationCopy) {
|
| // Just tell the window controller to update the indicator.
|
| - NSPoint hoverPoint = [view_ convertPointFromBase:[sender draggingLocation]];
|
| - [[view_ urlDropController] indicateDropURLsInView:view_ at:hoverPoint];
|
| + [[self windowController] indicateDropURLsAt:[sender draggingLocation]];
|
| }
|
| return dragOp;
|
| }
|
| @@ -65,9 +67,7 @@
|
|
|
| if ([urls count]) {
|
| // Tell the window controller about the dropped URL(s).
|
| - NSPoint dropPoint =
|
| - [view_ convertPointFromBase:[sender draggingLocation]];
|
| - [[view_ urlDropController] dropURLs:urls inView:view_ at:dropPoint];
|
| + [[self windowController] dropURLs:urls at:[sender draggingLocation]];
|
| return YES;
|
| }
|
| }
|
| @@ -79,13 +79,21 @@
|
|
|
| @implementation URLDropTargetHandler(Private)
|
|
|
| +- (id<URLDropTargetWindowController>)windowController {
|
| + id<URLDropTargetWindowController> controller =
|
| + [[view_ window] windowController];
|
| + DCHECK([(id)controller conformsToProtocol:
|
| + @protocol(URLDropTargetWindowController)]);
|
| + return controller;
|
| +}
|
| +
|
| - (NSDragOperation)getDragOperation:(id<NSDraggingInfo>)sender {
|
| // Only allow the copy operation.
|
| return [sender draggingSourceOperationMask] & NSDragOperationCopy;
|
| }
|
|
|
| - (void)hideIndicator {
|
| - [[view_ urlDropController] hideDropURLsIndicatorInView:view_];
|
| + [[self windowController] hideDropURLsIndicator];
|
| }
|
|
|
| @end // @implementation URLDropTargetHandler(Private)
|
|
|