Interface CefDownloadHandler

  • All Known Implementing Classes:
    CefClient, CefDownloadHandlerAdapter

    public interface CefDownloadHandler
    Implement this interface to handle file downloads. The methods of this class will called on the browser process UI thread.
    • Method Detail

      • onBeforeDownload

        void onBeforeDownload​(CefBrowser browser,
                              CefDownloadItem downloadItem,
                              java.lang.String suggestedName,
                              CefBeforeDownloadCallback callback)
        Called before a download begins. By default the download will be canceled. Execute callback either asynchronously or in this method to continue the download if desired.
        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