Index: content/public/common/drop_data.h |
diff --git a/content/public/common/drop_data.h b/content/public/common/drop_data.h |
index 53a76de75a1f9ff9df35e4475f096b6acd61f90e..80b19afc2810e40a4fb5e166931bb09bed3bfcc1 100644 |
--- a/content/public/common/drop_data.h |
+++ b/content/public/common/drop_data.h |
@@ -21,6 +21,10 @@ |
#include "ui/base/dragdrop/file_info.h" |
#include "url/gurl.h" |
+#if DCHECK_IS_ON() |
+#include "ipc/ipc_message.h" |
+#endif // DCHECK_IS_ON() |
+ |
namespace content { |
struct CONTENT_EXPORT DropData { |
@@ -32,10 +36,36 @@ struct CONTENT_EXPORT DropData { |
int64_t size; |
}; |
+ enum class Kind { |
+ STRING = 0, |
+ FILENAME, |
+ FILESYSTEMFILE, |
+ LAST = FILESYSTEMFILE |
+ }; |
+ |
+ struct Metadata { |
+ Metadata(); |
+ static Metadata createForMimeType(const DropData::Kind& kind, |
dcheng
2016/05/25 03:25:37
Nit: these should be capitalized. Also, DropData::
hush (inactive)
2016/05/25 17:17:15
Done.
|
+ const base::string16& mime_type); |
+ static Metadata createForFilePath(const base::FilePath& filename); |
+ static Metadata createForFileSystemUrl(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(); |
+#if DCHECK_IS_ON() |
+ int view_id = MSG_ROUTING_NONE; |
+#endif // DCHECK_IS_ON() |
+ |
// Whether this drag originated from a renderer. |
bool did_originate_from_renderer; |
@@ -54,6 +84,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; |