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

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

Issue 2674953003: Only generate suggested filenames when actually dragging an image. (Closed)
Patch Set: rebase Created 3 years, 10 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: 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 350aa61b77f338bfc6536e3440d462c56379c111..4e48dcdd3c7527cd2ded37aee17c33a28369362b 100644
--- a/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
+++ b/third_party/WebKit/Source/core/clipboard/DataObjectItem.h
@@ -56,8 +56,11 @@ class CORE_EXPORT DataObjectItem
static DataObjectItem* createFromURL(const String& url, const String& title);
static DataObjectItem* createFromHTML(const String& html,
const KURL& baseURL);
- static DataObjectItem* createFromSharedBuffer(const String& filename,
- PassRefPtr<SharedBuffer>);
+ static DataObjectItem* createFromSharedBuffer(
+ PassRefPtr<SharedBuffer>,
+ const KURL&,
+ const String& fileExtension,
+ const AtomicString& contentDisposition);
static DataObjectItem* createFromPasteboard(const String& type,
uint64_t sequenceNumber);
@@ -69,6 +72,7 @@ class CORE_EXPORT DataObjectItem
// Used to support legacy DataTransfer APIs and renderer->browser
// serialization.
PassRefPtr<SharedBuffer> sharedBuffer() const { return m_sharedBuffer; }
+ String filenameExtension() const { return m_filenameExtension; }
String title() const { return m_title; }
KURL baseURL() const { return m_baseURL; }
bool isFilename() const;
@@ -95,6 +99,7 @@ class CORE_EXPORT DataObjectItem
Member<File> m_file;
RefPtr<SharedBuffer> m_sharedBuffer;
// Optional metadata. Currently used for URL, HTML, and dragging files in.
+ String m_filenameExtension;
String m_title;
KURL m_baseURL;
« 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