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

Unified Diff: chrome/browser/ui/views/frame/browser_root_view.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/frame/browser_root_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 3bcb3d43858516a911b2016a78408ffcd6d58e59..491c6c95a16daa8421753c9eed1d48515038246a 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -53,7 +53,8 @@ bool BrowserRootView::CanDrop(const ui::OSExchangeData& data) {
return false;
// If there is a URL, we'll allow the drop.
- if (data.HasURL(ui::OSExchangeData::CONVERT_FILENAMES))
+ if (data.HasURL(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::DO_NOT_PARSE_TEXT_AS_URL))
return true;
// If there isn't a URL, see if we can 'paste and go'.
@@ -102,8 +103,9 @@ int BrowserRootView::OnPerformDrop(const ui::DropTargetEvent& event) {
GURL url;
base::string16 title;
ui::OSExchangeData mapped_data;
- if (!event.data().GetURLAndTitle(
- ui::OSExchangeData::CONVERT_FILENAMES, &url, &title) ||
+ if (!event.data().GetURLAndTitle(ui::OSExchangeData::CONVERT_FILENAMES,
+ ui::OSExchangeData::DO_NOT_PARSE_TEXT_AS_URL,
+ &url, &title) ||
!url.is_valid()) {
// The url isn't valid. Use the paste and go url.
if (GetPasteAndGoURL(event.data(), &url))
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_root_view_unittest.cc » ('j') | chrome/test/base/interactive_test_utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698