summaryrefslogtreecommitdiffstats
path: root/chrome/common
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 /chrome/common
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 'chrome/common')
-rw-r--r--chrome/common/render_messages.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 7d1273f..fa459a6 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -1666,6 +1666,7 @@ struct ParamTraits<WebDropData> {
static void Write(Message* m, const param_type& p) {
WriteParam(m, p.url);
WriteParam(m, p.url_title);
+ WriteParam(m, p.file_extension);
WriteParam(m, p.filenames);
WriteParam(m, p.plain_text);
WriteParam(m, p.text_html);
@@ -1677,6 +1678,7 @@ struct ParamTraits<WebDropData> {
return
ReadParam(m, iter, &p->url) &&
ReadParam(m, iter, &p->url_title) &&
+ ReadParam(m, iter, &p->file_extension) &&
ReadParam(m, iter, &p->filenames) &&
ReadParam(m, iter, &p->plain_text) &&
ReadParam(m, iter, &p->text_html) &&