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

Unified Diff: content/public/common/drop_data.cc

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use static factory methods Created 4 years, 7 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
Index: content/public/common/drop_data.cc
diff --git a/content/public/common/drop_data.cc b/content/public/common/drop_data.cc
index c8a24c85baba81c3af6ab36b93f68b78b908c2d0..9e96931a2d88f02168b1ec1b6aee2000660df595 100644
--- a/content/public/common/drop_data.cc
+++ b/content/public/common/drop_data.cc
@@ -16,4 +16,38 @@ DropData::DropData(const DropData& other) = default;
DropData::~DropData() {
}
+DropData::Metadata::Metadata() {}
+
+// static
+DropData::Metadata DropData::Metadata::createForMimeType(
+ const DropData::Kind& kind,
dcheng 2016/05/25 03:25:37 You shouldn't need the DropData:: specifier here.
hush (inactive) 2016/05/25 17:17:15 Done.
+ const base::string16& mime_type) {
+ DropData::Metadata metadata;
dcheng 2016/05/25 03:25:37 Ditto, DropData:: shouldn't be needed here (and be
hush (inactive) 2016/05/25 17:17:15 Done.
+ metadata.kind = kind;
+ metadata.mime_type = mime_type;
+ return metadata;
+}
+
+// static
+DropData::Metadata DropData::Metadata::createForFilePath(
+ const base::FilePath& filename) {
+ DropData::Metadata metadata;
+ metadata.kind = DropData::Kind::FILENAME;
+ metadata.filename = filename;
+ return metadata;
+}
+
+// static
+DropData::Metadata DropData::Metadata::createForFileSystemUrl(
+ const GURL& file_system_url) {
+ DropData::Metadata metadata;
+ metadata.kind = DropData::Kind::FILESYSTEMFILE;
+ metadata.file_system_url = file_system_url;
+ return metadata;
+}
+
+DropData::Metadata::Metadata(const DropData::Metadata& other) = default;
+
+DropData::Metadata::~Metadata() {}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698