Interface ICefDownloadHandler

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type ICefDownloadHandler = interface(ICefBaseRefCounted)

Description

Interface used to handle file downloads. The functions of this interface will called on the browser process UI thread.

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_download_handler_capi.h">CEF source file: /include/capi/cef_download_handler_capi.h (cef_download_handler_t))

Hierarchy

Overview

Methods

Public function CanDownload(const browser: ICefBrowser; const url, request_method: ustring): boolean;
Public procedure OnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);
Public procedure OnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback);
Public procedure RemoveReferences;

Description

Methods

Public function CanDownload(const browser: ICefBrowser; const url, request_method: ustring): boolean;

Called before a download begins in response to a user-initiated action (e.g. alt + link click or link click that returns a `Content-Disposition: attachment` response from the server). |url| is the target download URL and |request_function| is the target function (GET, POST, etc). Return true (1) to proceed with the download or false (0) to cancel the download.

Attributes
GUID['{3137F90A-5DC5-43C1-858D-A269F28EF4F1}']
Public procedure OnBeforeDownload(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const suggestedName: ustring; const callback: ICefBeforeDownloadCallback);

Called before a download begins. |suggested_name| is the suggested name for the download file. By default the download will be canceled. Execute |callback| either asynchronously or in this function to continue the download if desired. Do not keep a reference to |download_item| outside of this function.

Public procedure OnDownloadUpdated(const browser: ICefBrowser; const downloadItem: ICefDownloadItem; const callback: ICefDownloadItemCallback);

Called when a download's status or progress information has been updated. This may be called multiple times before and after OnBeforeDownload. Execute |callback| either asynchronously or in this function to cancel the download if desired. Do not keep a reference to |download_item| outside of this function.

Public procedure RemoveReferences;

Custom procedure to clear all references.


Generated by PasDoc 0.16.0-snapshot.