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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/browser/renderer_host/dip_util.h" | 9 #include "content/browser/renderer_host/dip_util.h" |
10 #include "content/browser/renderer_host/overscroll_controller.h" | 10 #include "content/browser/renderer_host/overscroll_controller.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 provider->SetURL(drop_data.url, drop_data.url_title); | 267 provider->SetURL(drop_data.url, drop_data.url_title); |
268 if (!drop_data.html.string().empty()) | 268 if (!drop_data.html.string().empty()) |
269 provider->SetHtml(drop_data.html.string(), drop_data.html_base_url); | 269 provider->SetHtml(drop_data.html.string(), drop_data.html_base_url); |
270 if (!drop_data.filenames.empty()) { | 270 if (!drop_data.filenames.empty()) { |
271 std::vector<ui::OSExchangeData::FileInfo> filenames; | 271 std::vector<ui::OSExchangeData::FileInfo> filenames; |
272 for (std::vector<WebDropData::FileInfo>::const_iterator it = | 272 for (std::vector<WebDropData::FileInfo>::const_iterator it = |
273 drop_data.filenames.begin(); | 273 drop_data.filenames.begin(); |
274 it != drop_data.filenames.end(); ++it) { | 274 it != drop_data.filenames.end(); ++it) { |
275 filenames.push_back( | 275 filenames.push_back( |
276 ui::OSExchangeData::FileInfo( | 276 ui::OSExchangeData::FileInfo( |
277 FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->path)), | 277 base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->path)), |
278 FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->display_name)))); | 278 base::FilePath::FromUTF8Unsafe(UTF16ToUTF8(it->display_name)))); |
279 } | 279 } |
280 provider->SetFilenames(filenames); | 280 provider->SetFilenames(filenames); |
281 } | 281 } |
282 if (!drop_data.custom_data.empty()) { | 282 if (!drop_data.custom_data.empty()) { |
283 Pickle pickle; | 283 Pickle pickle; |
284 ui::WriteCustomDataToPickle(drop_data.custom_data, &pickle); | 284 ui::WriteCustomDataToPickle(drop_data.custom_data, &pickle); |
285 #if defined(OS_WIN) | 285 #if defined(OS_WIN) |
286 provider->SetPickledData( | 286 provider->SetPickledData( |
287 ui::ClipboardUtil::GetWebCustomDataFormat()->cfFormat, pickle); | 287 ui::ClipboardUtil::GetWebCustomDataFormat()->cfFormat, pickle); |
288 #else | 288 #else |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 event.location(), | 1279 event.location(), |
1280 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), | 1280 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), |
1281 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); | 1281 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); |
1282 if (drag_dest_delegate_) | 1282 if (drag_dest_delegate_) |
1283 drag_dest_delegate_->OnDrop(); | 1283 drag_dest_delegate_->OnDrop(); |
1284 current_drop_data_.reset(); | 1284 current_drop_data_.reset(); |
1285 return current_drag_op_; | 1285 return current_drag_op_; |
1286 } | 1286 } |
1287 | 1287 |
1288 } // namespace content | 1288 } // namespace content |
OLD | NEW |