Package org.mozilla.geckoview
Class WebExtension.DownloadRequest
Object
org.mozilla.geckoview.WebExtension.DownloadRequest
- Enclosing class:
- WebExtension
Represents Web Extension API specific download request
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
-
Field Summary
Modifier and TypeFieldDescriptionfinal boolean
Flag that enables downloads to continue even if they encounter HTTP errors.static final int
The app should overwrite the old file with the newly-downloaded filestatic final int
The app should prompt the user, asking them to choose whether to uniquify or overwritestatic final int
The app should modify the filename to make it uniquefinal int
The action you want taken if there is a filename conflict, as defined herefinal int
Optional fetch flags forGeckoWebExecutor
final String
A file path relative to the default downloads directoryfinal WebRequest
Regular GeckoViewWebRequest
objectfinal boolean
Specifies whether to provide a file chooser dialog to allow the user to select a filename (true), or not (false) -
Constructor Summary
ModifierConstructorDescriptionprotected
DownloadRequest
(org.mozilla.geckoview.WebExtension.DownloadRequest.Builder builder) -
Method Summary
-
Field Details
-
request
Regular GeckoViewWebRequest
object -
downloadFlags
public final int downloadFlagsOptional fetch flags forGeckoWebExecutor
-
filename
A file path relative to the default downloads directory -
conflictActionFlag
public final int conflictActionFlagThe action you want taken if there is a filename conflict, as defined here -
saveAs
public final boolean saveAsSpecifies whether to provide a file chooser dialog to allow the user to select a filename (true), or not (false) -
allowHttpErrors
public final boolean allowHttpErrorsFlag that enables downloads to continue even if they encounter HTTP errors. When false, the download is canceled when it encounters an HTTP error. When true, the download continues when an HTTP error is encountered and the HTTP server error is not reported. However, if the download fails due to file-related, network-related, user-related, or other error, that error is reported. -
CONFLICT_ACTION_UNIQUIFY
public static final int CONFLICT_ACTION_UNIQUIFYThe app should modify the filename to make it unique- See Also:
-
CONFLICT_ACTION_OVERWRITE
public static final int CONFLICT_ACTION_OVERWRITEThe app should overwrite the old file with the newly-downloaded file- See Also:
-
CONFLICT_ACTION_PROMPT
public static final int CONFLICT_ACTION_PROMPTThe app should prompt the user, asking them to choose whether to uniquify or overwrite- See Also:
-
-
Constructor Details
-
DownloadRequest
protected DownloadRequest(org.mozilla.geckoview.WebExtension.DownloadRequest.Builder builder)
-