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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 135633002: Don't populate URL data in WebDropData when dragging files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Blink style enums Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/toolbar/home_button.cc ('k') | ui/base/dragdrop/os_exchange_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 // Utility to fill a DropData object from ui::OSExchangeData. 366 // Utility to fill a DropData object from ui::OSExchangeData.
367 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { 367 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) {
368 base::string16 plain_text; 368 base::string16 plain_text;
369 data.GetString(&plain_text); 369 data.GetString(&plain_text);
370 if (!plain_text.empty()) 370 if (!plain_text.empty())
371 drop_data->text = base::NullableString16(plain_text, false); 371 drop_data->text = base::NullableString16(plain_text, false);
372 372
373 GURL url; 373 GURL url;
374 base::string16 url_title; 374 base::string16 url_title;
375 data.GetURLAndTitle(&url, &url_title); 375 data.GetURLAndTitle(
376 ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES, &url, &url_title);
376 if (url.is_valid()) { 377 if (url.is_valid()) {
377 drop_data->url = url; 378 drop_data->url = url;
378 drop_data->url_title = url_title; 379 drop_data->url_title = url_title;
379 } 380 }
380 381
381 base::string16 html; 382 base::string16 html;
382 GURL html_base_url; 383 GURL html_base_url;
383 data.GetHtml(&html, &html_base_url); 384 data.GetHtml(&html, &html_base_url);
384 if (!html.empty()) 385 if (!html.empty())
385 drop_data->html = base::NullableString16(html, false); 386 drop_data->html = base::NullableString16(html, false);
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 event.location(), 1791 event.location(),
1791 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1792 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1792 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1793 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1793 if (drag_dest_delegate_) 1794 if (drag_dest_delegate_)
1794 drag_dest_delegate_->OnDrop(); 1795 drag_dest_delegate_->OnDrop();
1795 current_drop_data_.reset(); 1796 current_drop_data_.reset();
1796 return current_drag_op_; 1797 return current_drag_op_;
1797 } 1798 }
1798 1799
1799 } // namespace content 1800 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/home_button.cc ('k') | ui/base/dragdrop/os_exchange_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698