Chromium Embedded Framework (CEF)
126.2.0+g5c56e98+chromium-126.0.6478.62
|
Class used to handle file downloads. More...
#include "include/cef_download_handler.h"
Public Member Functions | |
virtual bool | CanDownload (CefRefPtr< CefBrowser > browser, const CefString &url, const CefString &request_method) |
Called before a download begins in response to a user-initiated action (e.g. More... | |
virtual bool | OnBeforeDownload (CefRefPtr< CefBrowser > browser, CefRefPtr< CefDownloadItem > download_item, const CefString &suggested_name, CefRefPtr< CefBeforeDownloadCallback > callback) |
Called before a download begins. More... | |
virtual void | OnDownloadUpdated (CefRefPtr< CefBrowser > browser, CefRefPtr< CefDownloadItem > download_item, CefRefPtr< CefDownloadItemCallback > callback) |
Called when a download's status or progress information has been updated. More... | |
Public Member Functions inherited from CefBaseRefCounted | |
virtual void | AddRef () const =0 |
Called to increment the reference count for the object. More... | |
virtual bool | Release () const =0 |
Called to decrement the reference count for the object. More... | |
virtual bool | HasOneRef () const =0 |
Returns true if the reference count is 1. More... | |
virtual bool | HasAtLeastOneRef () const =0 |
Returns true if the reference count is at least 1. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CefBaseRefCounted | |
virtual | ~CefBaseRefCounted () |
Class used to handle file downloads.
The methods of this class will called on the browser process UI thread.
|
inlinevirtual |
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_method| is the target method (GET, POST, etc). Return true to proceed with the download or false to cancel the download.
|
inlinevirtual |
Called before a download begins.
|suggested_name| is the suggested name for the download file. Return true and execute |callback| either asynchronously or in this method to continue or cancel the download. Return false to proceed with default handling (cancel with Alloy style, download shelf with Chrome style). Do not keep a reference to |download_item| outside of this method.
|
inlinevirtual |
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 method to cancel the download if desired. Do not keep a reference to |download_item| outside of this method.