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

Unified 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: review Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/render_view_host.h ('k') | content/public/common/drop_data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f131b8145588e5c808fb34fe416c338b935d88e7 100644
--- a/content/public/common/drop_data.h
+++ b/content/public/common/drop_data.h
@@ -17,6 +17,7 @@
#include "base/strings/nullable_string16.h"
#include "content/common/content_export.h"
+#include "ipc/ipc_message.h"
#include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
#include "ui/base/dragdrop/file_info.h"
#include "url/gurl.h"
@@ -32,10 +33,34 @@ struct CONTENT_EXPORT DropData {
int64_t size;
};
+ enum class Kind {
+ STRING = 0,
+ FILENAME,
+ FILESYSTEMFILE,
+ LAST = FILESYSTEMFILE
+ };
+
+ struct Metadata {
+ Metadata();
+ static Metadata CreateForMimeType(const Kind& kind,
+ 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();
+
+ Kind kind;
+ base::string16 mime_type;
+ base::FilePath filename;
+ GURL file_system_url;
+ };
+
DropData();
DropData(const DropData& other);
~DropData();
+ int view_id = MSG_ROUTING_NONE;
+
// Whether this drag originated from a renderer.
bool did_originate_from_renderer;
@@ -54,6 +79,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;
« no previous file with comments | « content/public/browser/render_view_host.h ('k') | content/public/common/drop_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698