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:
Marshall Greenblatt
2024-04-26 15:21:33 -04:00
parent ed079792b6
commit be6642df3f
23 changed files with 873 additions and 616 deletions

View File

@@ -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(