summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webdropdata.h
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 01:53:05 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-29 01:53:05 +0000
commita6c712d9b9f2459273ad7616e03ee5f823d539ca (patch)
tree23e12a6a9613eb38ce7ccf4461084edef6b5e588 /webkit/glue/webdropdata.h
parent5a6e27ee83d4cc43959f10145b66a1115cfe6e96 (diff)
downloadchromium_src-a6c712d9b9f2459273ad7616e03ee5f823d539ca.zip
chromium_src-a6c712d9b9f2459273ad7616e03ee5f823d539ca.tar.gz
chromium_src-a6c712d9b9f2459273ad7616e03ee5f823d539ca.tar.bz2
Generate a proper file name when dragging an image from a
web page to the desktop. We receive information about the image from WebKit in the render which includes the image URL, MIME type and a guess as to what the file name is. If the filename is empty, we synthesize a file name based on the URL. In all cases, we set the file extension to the MIME type that was detected by WebKit. This change is the Chromium portion of image dragging. The WebKit portion has been committed as: http://trac.webkit.org/changeset/40294 BUG=6481 (http://crbug.com/6481) Review URL: http://codereview.chromium.org/19417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webdropdata.h')
-rw-r--r--webkit/glue/webdropdata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/webkit/glue/webdropdata.h b/webkit/glue/webdropdata.h
index e6d51f4..9afcd04 100644
--- a/webkit/glue/webdropdata.h
+++ b/webkit/glue/webdropdata.h
@@ -20,6 +20,9 @@ struct WebDropData {
GURL url;
std::wstring url_title; // The title associated with |url|.
+ // File extension for dragging images from a webview to the desktop.
+ std::wstring file_extension;
+
// User is dropping one or more files on the webview.
std::vector<std::wstring> filenames;