Package org.cef.handler
Interface CefDownloadHandler
-
- All Known Implementing Classes:
CefClient,CefDownloadHandlerAdapter
public interface CefDownloadHandlerImplement this interface to handle file downloads. The methods of this class will called on the browser process UI thread.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanonBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, java.lang.String suggestedName, CefBeforeDownloadCallback callback)Called before a download begins.voidonDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)Called when a download's status or progress information has been updated.
-
-
-
Method Detail
-
onBeforeDownload
boolean onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, java.lang.String suggestedName, CefBeforeDownloadCallback callback)
Called before a download begins. 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 downloadItem outside of this method.- Parameters:
browser- The desired browser.downloadItem- The item to be downloaded. Do not keep a reference to it outside this method.suggestedName- is the suggested name for the download file.callback- start the download by calling the Continue method
-
onDownloadUpdated
void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)
Called when a download's status or progress information has been updated.- Parameters:
browser- The desired browser.downloadItem- The downloading item.callback- Execute callback to cancel the download
-
-