Class CefDownloadHandlerAdapter

  • All Implemented Interfaces:
    CefDownloadHandler

    public abstract class CefDownloadHandlerAdapter
    extends java.lang.Object
    implements CefDownloadHandler
    An abstract adapter class for receiving download events. The methods in this class are empty. This class exists as convenience for creating handler objects.
    • Constructor Detail

      • CefDownloadHandlerAdapter

        public CefDownloadHandlerAdapter()
    • Method Detail

      • onBeforeDownload

        public boolean onBeforeDownload​(CefBrowser browser,
                                        CefDownloadItem downloadItem,
                                        java.lang.String suggestedName,
                                        CefBeforeDownloadCallback callback)
        Description copied from interface: CefDownloadHandler
        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.
        Specified by:
        onBeforeDownload in interface CefDownloadHandler
        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