Add more robust download handler implementation (issue #156).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@155 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2011-01-06 19:26:45 +00:00
parent 99a1d4ac58
commit a99e32072e
3 changed files with 115 additions and 41 deletions

View File

@@ -42,9 +42,9 @@ v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);
// Clear all cached data.
void ClearCache();
// Returns true if the specified 'Content-Disposition' header value represents
// an attachment download. Also returns the file name.
bool IsContentDispositionAttachment(const std::string& cd_header,
std::string& file_name);
// Returns true if the request represents a download based on
// the supplied Content-Type and Content-Disposition headers.
bool ShouldDownload(const std::string& content_disposition,
const std::string& mime_type);
} // namespace webkit_glue