mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: Add CefDownloadHandler support (see #3681)
Behaves the same as Alloy runtime except that CanDownload is not called for invalid protocol schemes.
This commit is contained in:
@@ -858,7 +858,7 @@ bool ClientHandler::CanDownload(CefRefPtr<CefBrowser> browser,
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClientHandler::OnBeforeDownload(
|
||||
bool ClientHandler::OnBeforeDownload(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDownloadItem> download_item,
|
||||
const CefString& suggested_name,
|
||||
@@ -867,6 +867,7 @@ void ClientHandler::OnBeforeDownload(
|
||||
|
||||
// Continue the download and show the "Save As" dialog.
|
||||
callback->Continue(MainContext::Get()->GetDownloadPath(suggested_name), true);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ClientHandler::OnDownloadUpdated(
|
||||
|
Reference in New Issue
Block a user