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

Side by Side Diff: content/public/common/drop_data.h

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 // A struct for managing data being dropped on a WebContents. This represents 5 // A struct for managing data being dropped on a WebContents. This represents
6 // a union of all the types of data that can be dropped in a platform neutral 6 // a union of all the types of data that can be dropped in a platform neutral
7 // way. 7 // way.
8 8
9 #ifndef CONTENT_PUBLIC_COMMON_DROP_DATA_H_ 9 #ifndef CONTENT_PUBLIC_COMMON_DROP_DATA_H_
10 #define CONTENT_PUBLIC_COMMON_DROP_DATA_H_ 10 #define CONTENT_PUBLIC_COMMON_DROP_DATA_H_
11 11
12 #include <stdint.h> 12 #include <stdint.h>
13 13
14 #include <map> 14 #include <map>
15 #include <string> 15 #include <string>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/strings/nullable_string16.h" 18 #include "base/strings/nullable_string16.h"
19 #include "content/common/content_export.h" 19 #include "content/common/content_export.h"
20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" 20 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
21 #include "ui/base/dragdrop/file_info.h" 21 #include "ui/base/dragdrop/file_info.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 namespace content { 24 namespace content {
25 25
26 enum DropDataKind {
27 STRING_KIND = 0,
28 FILENAME_KIND,
29 FILESYSTEMFILE_KIND,
30 DROP_DATA_KIND_LAST = FILESYSTEMFILE_KIND
31 };
32
33 typedef std::pair<base::string16, DropDataKind> MimeTypeKindPair;
34
26 struct CONTENT_EXPORT DropData { 35 struct CONTENT_EXPORT DropData {
27 struct FileSystemFileInfo { 36 struct FileSystemFileInfo {
28 FileSystemFileInfo() : size(0) {} 37 FileSystemFileInfo() : size(0) {}
29 ~FileSystemFileInfo() {} 38 ~FileSystemFileInfo() {}
30 39
31 GURL url; 40 GURL url;
32 int64_t size; 41 int64_t size;
33 }; 42 };
34 43
35 DropData(); 44 DropData();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // User is dragging data from the webview (e.g., an image). 82 // User is dragging data from the webview (e.g., an image).
74 base::string16 file_description_filename; 83 base::string16 file_description_filename;
75 std::string file_contents; 84 std::string file_contents;
76 85
77 std::map<base::string16, base::string16> custom_data; 86 std::map<base::string16, base::string16> custom_data;
78 }; 87 };
79 88
80 } // namespace content 89 } // namespace content
81 90
82 #endif // CONTENT_PUBLIC_COMMON_DROP_DATA_H_ 91 #endif // CONTENT_PUBLIC_COMMON_DROP_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698