Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| index 97eb5f57a8c69e4dc60dc633054ae5fa214548fe..cc29dc14ccbd127ec561bf71d45dc66abae1cfbb 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| @@ -2106,19 +2106,18 @@ CGFloat FlipXInView(NSView* view, CGFloat width, CGFloat x) { |
| return; |
| } |
| - //TODO(viettrungluu): dropping multiple URLs. |
| - if ([urls count] > 1) |
| - NOTIMPLEMENTED(); |
| + for (id urlString in [urls reverseObjectEnumerator]) { |
| + GURL url = url_formatter::FixupURL(base::SysNSStringToUTF8(urlString), |
| + std::string()); |
| - // Get the first URL and fix it up. |
| - GURL url(GURL(url_formatter::FixupURL( |
| - base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string()))); |
| + // If the URL isn't valid, don't bother. |
| + if (!url.is_valid()) |
| + continue; |
| - // If the URL isn't valid, don't bother. |
| - if (!url.is_valid()) |
| - return; |
| + [self openURL:&url inView:view at:point]; |
| + } |
| - [self openURL:&url inView:view at:point]; |
| + tabStripModel_->ActivateTabAt(tabStripModel_->count() - 1, true); |
|
erikchen
2016/11/14 18:22:53
is this necessary? This assumes that the last tab
shahriar
2016/11/15 02:51:12
Right, I fixed it to select the last tab inserted.
|
| } |
| // (URLDropTargetController protocol) |