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

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: rebase Created 4 years, 8 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 20 matching lines...) Expand all
31 switch (item.storageType) { 31 switch (item.storageType) {
32 case WebDragData::Item::StorageTypeString: { 32 case WebDragData::Item::StorageTypeString: {
33 base::string16 str_type(item.stringType); 33 base::string16 str_type(item.stringType);
34 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeText)) { 34 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeText)) {
35 result.text = base::NullableString16(item.stringData, false); 35 result.text = base::NullableString16(item.stringData, false);
36 break; 36 break;
37 } 37 }
38 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) { 38 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeURIList)) {
39 result.url = blink::WebStringToGURL(item.stringData); 39 result.url = blink::WebStringToGURL(item.stringData);
40 result.url_title = item.title; 40 result.url_title = item.title;
41 result.has_url = true;
41 break; 42 break;
42 } 43 }
43 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeDownloadURL)) { 44 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeDownloadURL)) {
44 result.download_metadata = item.stringData; 45 result.download_metadata = item.stringData;
45 break; 46 break;
46 } 47 }
47 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeHTML)) { 48 if (base::EqualsASCII(str_type, ui::Clipboard::kMimeTypeHTML)) {
48 result.html = base::NullableString16(item.stringData, false); 49 result.html = base::NullableString16(item.stringData, false);
49 result.html_base_url = item.baseURL; 50 result.html_base_url = item.baseURL;
50 break; 51 break;
(...skipping 20 matching lines...) Expand all
71 result.file_system_files.push_back(info); 72 result.file_system_files.push_back(info);
72 break; 73 break;
73 } 74 }
74 } 75 }
75 } 76 }
76 77
77 return result; 78 return result;
78 } 79 }
79 80
80 } // namespace content 81 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698