OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |