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

Unified Diff: third_party/WebKit/Source/core/clipboard/DataObjectItem.h

Issue 2582463002: Fix webkitGetEntry for non-native files. (Closed)
Patch Set: . Created 4 years 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: third_party/WebKit/Source/core/clipboard/DataObjectItem.h
diff --git a/third_party/WebKit/Source/core/clipboard/DataObjectItem.h b/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
index 419fc126141ecc4e00f9b7d5300b5a215edcf029..123eb78b52026dabb34f0a8967e912da1934cbbc 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
+++ b/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
@@ -50,6 +50,11 @@ class CORE_EXPORT DataObjectItem
static DataObjectItem* createFromString(const String& type,
const String& data);
static DataObjectItem* createFromFile(File*);
+ // File with non-empty filesystem ID can be converted into FileEntry by using
+ // webkitGetAsEntry.
+ static DataObjectItem* createFromFileWithFileSystemId(
+ File*,
+ const String& fileSystemId);
static DataObjectItem* createFromURL(const String& url, const String& title);
static DataObjectItem* createFromHTML(const String& html,
const KURL& baseURL);
@@ -70,6 +75,9 @@ class CORE_EXPORT DataObjectItem
KURL baseURL() const { return m_baseURL; }
bool isFilename() const;
+ bool hasFileSystemId() const;
+ String fileSystemId() const;
+
DECLARE_TRACE();
private:
@@ -93,6 +101,7 @@ class CORE_EXPORT DataObjectItem
KURL m_baseURL;
uint64_t m_sequenceNumber; // Only valid when m_source == PasteboardSource
+ String m_fileSystemId; // Only valid when m_file is backed by FileEntry.
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/clipboard/DataObject.cpp ('k') | third_party/WebKit/Source/core/clipboard/DataObjectItem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698