Interface CefriumBrowser.CefriumDownloadHandler
- Enclosing class:
CefriumBrowser
public static interface CefriumBrowser.CefriumDownloadHandler
Richer download handler that can allow/deny a download before it starts
and cancel/pause/resume one in progress. Prefer this over
CefriumBrowser.OnDownloadListener (which is detect-only and kept for
compatibility). Mirrors CEF's CefDownloadHandler.
Callbacks arrive on the browser's UI thread.
-
Method Summary
Modifier and TypeMethodDescriptionvoidA download is about to start.voidProgress update for an in-flight download.
-
Method Details
-
onBeforeDownload
void onBeforeDownload(CefriumBrowser.DownloadItem item, CefriumBrowser.BeforeDownloadCallback callback) A download is about to start. Decide asynchronously whether to allow it -- callcallback.allow(path)to download (passnullto use the suggested path) orcallback.cancel()to block it (e.g. after an accidental click). The download does not begin until one of the two is called; you may show a dialog first. -
onDownloadUpdated
Progress update for an in-flight download. UseCefriumBrowser.DownloadItem'scancel()/pause()/resume()to control it.
-