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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 2322253004: Drag and dropping text, parsable as url (Closed)
Patch Set: initial patch for windows 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/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 7800dc987e5ae98dd56dfdc7a7189dc17e99408a..1f43d7f4ec04dfe089683181b9b92042d2f042a2 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -1610,8 +1610,9 @@ void TabStrip::OnDragEntered(const DropTargetEvent& event) {
base::string16 title;
// Check whether the event data includes supported drop data.
- if (event.data().GetURLAndTitle(
- ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) &&
+ if (event.data().GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::PARSE_TEXT_AS_URL, &url,
+ &title) &&
url.is_valid()) {
drop_info_->url = url;
@@ -1652,8 +1653,9 @@ int TabStrip::OnPerformDrop(const DropTargetEvent& event) {
GURL url;
base::string16 title;
if (!file_supported ||
- !event.data().GetURLAndTitle(
- ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) ||
+ !event.data().GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::PARSE_TEXT_AS_URL, &url,
+ &title) ||
!url.is_valid())
return ui::DragDropTypes::DRAG_NONE;

Powered by Google App Engine
This is Rietveld 408576698