mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2009 The Chromium Embedded Framework Authors. All rights
|
||||
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that
|
||||
// can be found in the LICENSE file.
|
||||
//
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "libcef_dll/cpptoc/request_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/stream_reader_cpptoc.h"
|
||||
#include "libcef_dll/cpptoc/v8value_cpptoc.h"
|
||||
#include "libcef_dll/ctocpp/download_handler_ctocpp.h"
|
||||
#include "libcef_dll/ctocpp/handler_ctocpp.h"
|
||||
#include "libcef_dll/transfer_util.h"
|
||||
|
||||
@@ -178,6 +179,26 @@ CefHandler::RetVal CefHandlerCToCpp::HandleBeforeResourceLoad(
|
||||
return rv;
|
||||
}
|
||||
|
||||
CefHandler::RetVal CefHandlerCToCpp::HandleDownloadResponse(
|
||||
CefRefPtr<CefBrowser> browser, const std::wstring& mimeType,
|
||||
const std::wstring& fileName, int64 contentLength,
|
||||
CefRefPtr<CefDownloadHandler>& handler)
|
||||
{
|
||||
if(CEF_MEMBER_MISSING(struct_, handle_download_response))
|
||||
return RV_CONTINUE;
|
||||
|
||||
cef_download_handler_t* handlerRet = NULL;
|
||||
|
||||
cef_retval_t rv = struct_->handle_download_response(struct_,
|
||||
CefBrowserCppToC::Wrap(browser), mimeType.c_str(), fileName.c_str(),
|
||||
contentLength, &handlerRet);
|
||||
|
||||
if(handlerRet)
|
||||
handler = CefDownloadHandlerCToCpp::Wrap(handlerRet);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
CefHandler::RetVal CefHandlerCToCpp::HandleBeforeMenu(
|
||||
CefRefPtr<CefBrowser> browser, const MenuInfo& menuInfo)
|
||||
{
|
||||
|
Reference in New Issue
Block a user