Package org.cef.handler
Class CefDownloadHandlerAdapter
- java.lang.Object
-
- org.cef.handler.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 Summary
Constructors Constructor Description CefDownloadHandlerAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, java.lang.String suggestedName, CefBeforeDownloadCallback callback)
Called before a download begins.void
onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)
Called when a download's status or progress information has been updated.
-
-
-
Method Detail
-
onBeforeDownload
public void onBeforeDownload(CefBrowser browser, CefDownloadItem downloadItem, java.lang.String suggestedName, CefBeforeDownloadCallback callback)
Description copied from interface:CefDownloadHandler
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.- Specified by:
onBeforeDownload
in interfaceCefDownloadHandler
- 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
public void onDownloadUpdated(CefBrowser browser, CefDownloadItem downloadItem, CefDownloadItemCallback callback)
Description copied from interface:CefDownloadHandler
Called when a download's status or progress information has been updated.- Specified by:
onDownloadUpdated
in interfaceCefDownloadHandler
- Parameters:
browser
- The desired browser.downloadItem
- The downloading item.callback
- Execute callback to cancel the download
-
-