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

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

Issue 137783015: Merge 244538 "Don't populate URL data in WebDropData when draggi..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 // Utility to fill a DropData object from ui::OSExchangeData. 365 // Utility to fill a DropData object from ui::OSExchangeData.
366 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { 366 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) {
367 base::string16 plain_text; 367 base::string16 plain_text;
368 data.GetString(&plain_text); 368 data.GetString(&plain_text);
369 if (!plain_text.empty()) 369 if (!plain_text.empty())
370 drop_data->text = base::NullableString16(plain_text, false); 370 drop_data->text = base::NullableString16(plain_text, false);
371 371
372 GURL url; 372 GURL url;
373 base::string16 url_title; 373 base::string16 url_title;
374 data.GetURLAndTitle(&url, &url_title); 374 data.GetURLAndTitle(
375 ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES, &url, &url_title);
375 if (url.is_valid()) { 376 if (url.is_valid()) {
376 drop_data->url = url; 377 drop_data->url = url;
377 drop_data->url_title = url_title; 378 drop_data->url_title = url_title;
378 } 379 }
379 380
380 base::string16 html; 381 base::string16 html;
381 GURL html_base_url; 382 GURL html_base_url;
382 data.GetHtml(&html, &html_base_url); 383 data.GetHtml(&html, &html_base_url);
383 if (!html.empty()) 384 if (!html.empty())
384 drop_data->html = base::NullableString16(html, false); 385 drop_data->html = base::NullableString16(html, false);
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 event.location(), 1790 event.location(),
1790 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1791 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1791 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1792 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1792 if (drag_dest_delegate_) 1793 if (drag_dest_delegate_)
1793 drag_dest_delegate_->OnDrop(); 1794 drag_dest_delegate_->OnDrop();
1794 current_drop_data_.reset(); 1795 current_drop_data_.reset();
1795 return current_drag_op_; 1796 return current_drag_op_;
1796 } 1797 }
1797 1798
1798 } // namespace content 1799 } // 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