Merge revision 1007 changes:
- Allow empty |mimeType| argument to GetDownloadHandler (issue #405). git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1364@1008 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
08f7a4bcc2
commit
6990820200
|
@ -132,7 +132,7 @@ class CefRequestHandler : public virtual CefBase {
|
|||
// CefDownloadHandler instance that will recieve the file contents. Return
|
||||
// true to download the file or false to cancel the file download.
|
||||
///
|
||||
/*--cef()--*/
|
||||
/*--cef(optional_param=mimeType)--*/
|
||||
virtual bool GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
||||
const CefString& mimeType,
|
||||
const CefString& fileName,
|
||||
|
|
|
@ -254,10 +254,6 @@ int CEF_CALLBACK request_handler_get_download_handler(
|
|||
DCHECK(browser);
|
||||
if (!browser)
|
||||
return 0;
|
||||
// Verify param: mimeType; type: string_byref_const
|
||||
DCHECK(mimeType);
|
||||
if (!mimeType)
|
||||
return 0;
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(fileName);
|
||||
if (!fileName)
|
||||
|
@ -266,6 +262,7 @@ int CEF_CALLBACK request_handler_get_download_handler(
|
|||
DCHECK(handler);
|
||||
if (!handler)
|
||||
return 0;
|
||||
// Unverified params: mimeType
|
||||
|
||||
// Translate param: handler; type: refptr_same_byref
|
||||
CefRefPtr<CefDownloadHandler> handlerPtr;
|
||||
|
|
|
@ -217,14 +217,11 @@ bool CefRequestHandlerCToCpp::GetDownloadHandler(CefRefPtr<CefBrowser> browser,
|
|||
DCHECK(browser.get());
|
||||
if (!browser.get())
|
||||
return false;
|
||||
// Verify param: mimeType; type: string_byref_const
|
||||
DCHECK(!mimeType.empty());
|
||||
if (mimeType.empty())
|
||||
return false;
|
||||
// Verify param: fileName; type: string_byref_const
|
||||
DCHECK(!fileName.empty());
|
||||
if (fileName.empty())
|
||||
return false;
|
||||
// Unverified params: mimeType
|
||||
|
||||
// Translate param: handler; type: refptr_same_byref
|
||||
cef_download_handler_t* handlerStruct = NULL;
|
||||
|
|
Loading…
Reference in New Issue