Chromium Code Reviews| Index: content/public/common/drop_data.h |
| diff --git a/content/public/common/drop_data.h b/content/public/common/drop_data.h |
| index fce6db13774f772181d135a12c452ff553f58699..923fb56c68f614a732a349f2f07b23b766653207 100644 |
| --- a/content/public/common/drop_data.h |
| +++ b/content/public/common/drop_data.h |
| @@ -32,6 +32,27 @@ struct CONTENT_EXPORT DropData { |
| int64_t size; |
| }; |
| + enum class Kind { |
| + STRING = 0, |
| + FILENAME, |
| + FILESYSTEMFILE, |
| + LAST = FILESYSTEMFILE |
| + }; |
| + |
| + struct MetaData { |
|
dcheng
2016/05/24 05:51:50
Nit: Metadata instead of MetaData, as that seems t
hush (inactive)
2016/05/24 20:26:09
Done.
|
| + MetaData(); |
| + MetaData(const DropData::Kind& kind, const base::string16& mime_type); |
|
dcheng
2016/05/24 05:51:50
Hmm. Rather than having constructors and having to
hush (inactive)
2016/05/24 20:26:09
Sorry I don't see the benefit of these static fact
dcheng
2016/05/25 00:07:58
The main reason I suggested factory functions is t
hush (inactive)
2016/05/25 02:31:16
OK. I did the static factory methods.
|
| + MetaData(const DropData::Kind& kind, const base::FilePath& filename); |
| + MetaData(const DropData::Kind& kind, const GURL& file_system_url); |
| + MetaData(const MetaData& other); |
| + ~MetaData(); |
| + |
| + DropData::Kind kind; |
| + base::string16 mime_type; |
| + base::FilePath filename; |
| + GURL file_system_url; |
| + }; |
| + |
| DropData(); |
| DropData(const DropData& other); |
| ~DropData(); |
| @@ -54,6 +75,8 @@ struct CONTENT_EXPORT DropData { |
| // populated if the drag is not renderer tainted, as this allows File access |
| // from web content. |
| std::vector<ui::FileInfo> filenames; |
| + // The mime types of dragged files. |
| + std::vector<base::string16> file_mime_types; |
| // Isolated filesystem ID for the files being dragged on the webview. |
| base::string16 filesystem_id; |