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

Side by Side Diff: content/renderer/drop_data_builder.cc

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Send "meta data" of dropData in DragEnter Created 4 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/drop_data_builder.h" 5 #include "content/renderer/drop_data_builder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "content/public/common/drop_data.h" 10 #include "content/public/common/drop_data.h"
(...skipping 19 matching lines...) Expand all
30 switch (item.storageType) { 30 switch (item.storageType) {
31 case WebDragData::Item::StorageTypeString: { 31 case WebDragData::Item::StorageTypeString: {
32 base::string16 str_type(item.stringType); 32 base::string16 str_type(item.stringType);
33 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeText)) { 33 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeText)) {
34 result.text = base::NullableString16(item.stringData, false); 34 result.text = base::NullableString16(item.stringData, false);
35 break; 35 break;
36 } 36 }
37 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) { 37 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) {
38 result.url = blink::WebStringToGURL(item.stringData); 38 result.url = blink::WebStringToGURL(item.stringData);
39 result.url_title = item.title; 39 result.url_title = item.title;
40 result.has_url = true;
40 break; 41 break;
41 } 42 }
42 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeDownloadURL)) { 43 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeDownloadURL)) {
43 result.download_metadata = item.stringData; 44 result.download_metadata = item.stringData;
44 break; 45 break;
45 } 46 }
46 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeHTML)) { 47 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeHTML)) {
47 result.html = base::NullableString16(item.stringData, false); 48 result.html = base::NullableString16(item.stringData, false);
48 result.html_base_url = item.baseURL; 49 result.html_base_url = item.baseURL;
49 break; 50 break;
(...skipping 20 matching lines...) Expand all
70 result.file_system_files.push_back(info); 71 result.file_system_files.push_back(info);
71 break; 72 break;
72 } 73 }
73 } 74 }
74 } 75 }
75 76
76 return result; 77 return result;
77 } 78 }
78 79
79 } // namespace content 80 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698