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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm

Issue 2502483002: Fixed dragging a folder from bookmark manager to open all elements in new tabs (Closed)
Patch Set: Created 4 years, 1 month 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/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..0bdce39b744fb7cf9dd10f0580a1563b1c557cf1 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(GURL(url_formatter::FixupURL(base::SysNSStringToUTF8(urlString),
+ std::string())));
Avi (use Gerrit) 2016/11/13 22:55:55 FixupURL returns a GURL. That original code makes
shahriar 2016/11/13 23:40:34 Done.
- // 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);
}
// (URLDropTargetController protocol)

Powered by Google App Engine
This is Rietveld 408576698