- Add the CefHandler::HandleDownloadResponse() method and CefDownloadHandler class to support file download in response to 'Content-Disposition' headers (issue #6).

- Fix parsing error in cef_parser.py due to space between angle brackets in template type definitions, and add support for int64 type.
- Update copyright messages in Python and generated files.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@117 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-10-16 19:10:11 +00:00
parent 6db1d580cd
commit 9aa285ac8d
85 changed files with 831 additions and 81 deletions

View File

@@ -9,6 +9,7 @@
MSVC_PUSH_WARNING_LEVEL(0);
#include "Cache.h"
#include "TextEncoding.h"
#include "third_party/WebKit/WebCore/platform/network/HTTPParsers.h"
#include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h"
MSVC_POP_WARNING();
@@ -145,4 +146,20 @@ void EnableSpdy(bool enable) {
// Used in benchmarking, Ignored for CEF.
}
bool IsContentDispositionAttachment(const std::string& cd_header,
std::string& file_name) {
WTF::String cd_str(cd_header.c_str(), cd_header.length());
if (WebCore::contentDispositionType(cd_str) ==
WebCore::ContentDispositionAttachment) {
WTF::String name_str =
WebCore::filenameFromHTTPContentDisposition(cd_str);
if (!name_str.isEmpty()) {
file_name = WideToUTF8(
std::wstring(name_str.characters(), name_str.length()));
}
return true;
}
return false;
}
} // namespace webkit_glue