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
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceConflict action flag definitions for downloads. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal booleanFlag that enables downloads to continue even if they encounter HTTP errors.static final intThe app should overwrite the old file with the newly-downloaded filestatic final intThe app should prompt the user, asking them to choose whether to uniquify or overwritestatic final intThe app should modify the filename to make it uniquefinal intThe action you want taken if there is a filename conflict, as defined herefinal intOptional fetch flags forGeckoWebExecutorfinal StringA file path relative to the default downloads directoryfinal WebRequestRegular GeckoViewWebRequestobjectfinal booleanSpecifies whether to provide a file chooser dialog to allow the user to select a filename (true), or not (false) -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDownloadRequest(org.mozilla.geckoview.WebExtension.DownloadRequest.Builder builder) Create a DownloadRequest from the given builder. -
Method Summary
-
Field Details
-
request
Regular GeckoViewWebRequestobject -
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) Create a DownloadRequest from the given builder.- Parameters:
builder- The builder containing the request configuration.
-