mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Add download handling support via new CefDownloadHandler and CefDownloadItem interfaces (issue #516).
- Fix setting of CefKeyEvent.focus_on_editable_field when the underlying RenderViewHost changes. - Fix potential crash if URLRequest objects are still in-progress upon shutdown. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@715 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -179,6 +179,27 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientHandler::OnBeforeDownload(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDownloadItem> download_item,
|
||||
const CefString& suggested_name,
|
||||
CefRefPtr<CefBeforeDownloadCallback> callback) {
|
||||
REQUIRE_UI_THREAD();
|
||||
// Continue the download and show the "Save As" dialog.
|
||||
callback->Continue(GetDownloadPath(suggested_name), true);
|
||||
}
|
||||
|
||||
void ClientHandler::OnDownloadUpdated(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
CefRefPtr<CefDownloadItem> download_item,
|
||||
CefRefPtr<CefDownloadItemCallback> callback) {
|
||||
REQUIRE_UI_THREAD();
|
||||
if (download_item->IsComplete()) {
|
||||
SetLastDownloadFile(download_item->GetFullPath());
|
||||
SendNotification(NOTIFY_DOWNLOAD_COMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientHandler::OnRequestGeolocationPermission(
|
||||
CefRefPtr<CefBrowser> browser,
|
||||
const CefString& requesting_url,
|
||||
|
Reference in New Issue
Block a user