| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 result.setItems(item_list); | 230 result.setItems(item_list); |
| 231 return result; | 231 return result; |
| 232 } | 232 } |
| 233 | 233 |
| 234 WebDragData DropDataToWebDragData(const DropData& drop_data) { | 234 WebDragData DropDataToWebDragData(const DropData& drop_data) { |
| 235 std::vector<WebDragData::Item> item_list; | 235 std::vector<WebDragData::Item> item_list; |
| 236 | 236 |
| 237 // These fields are currently unused when dragging into WebKit. | 237 // These fields are currently unused when dragging into WebKit. |
| 238 DCHECK(drop_data.download_metadata.empty()); | 238 DCHECK(drop_data.download_metadata.empty()); |
| 239 DCHECK(drop_data.file_contents.empty()); | 239 DCHECK(drop_data.file_contents.empty()); |
| 240 DCHECK(drop_data.file_description_filename.empty()); | 240 DCHECK(drop_data.file_contents_content_disposition.empty()); |
| 241 | 241 |
| 242 if (!drop_data.text.is_null()) { | 242 if (!drop_data.text.is_null()) { |
| 243 WebDragData::Item item; | 243 WebDragData::Item item; |
| 244 item.storageType = WebDragData::Item::StorageTypeString; | 244 item.storageType = WebDragData::Item::StorageTypeString; |
| 245 item.stringType = WebString::fromUTF8(ui::Clipboard::kMimeTypeText); | 245 item.stringType = WebString::fromUTF8(ui::Clipboard::kMimeTypeText); |
| 246 item.stringData = WebString::fromUTF16(drop_data.text.string()); | 246 item.stringData = WebString::fromUTF16(drop_data.text.string()); |
| 247 item_list.push_back(item); | 247 item_list.push_back(item); |
| 248 } | 248 } |
| 249 | 249 |
| 250 if (!drop_data.url.is_empty()) { | 250 if (!drop_data.url.is_empty()) { |
| (...skipping 2042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2293 // browser side (https://crbug.com/669219). | 2293 // browser side (https://crbug.com/669219). |
| 2294 // If there is no WebFrameWidget, then there will be no | 2294 // If there is no WebFrameWidget, then there will be no |
| 2295 // InputMethodControllers for a WebLocalFrame. | 2295 // InputMethodControllers for a WebLocalFrame. |
| 2296 return nullptr; | 2296 return nullptr; |
| 2297 } | 2297 } |
| 2298 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) | 2298 return static_cast<blink::WebFrameWidget*>(GetWebWidget()) |
| 2299 ->getActiveWebInputMethodController(); | 2299 ->getActiveWebInputMethodController(); |
| 2300 } | 2300 } |
| 2301 | 2301 |
| 2302 } // namespace content | 2302 } // namespace content |
| OLD | NEW |