| 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |