Class WebExtension.DownloadRequest

Object
org.mozilla.geckoview.WebExtension.DownloadRequest
Enclosing class:
WebExtension

public static class WebExtension.DownloadRequest extends Object
Represents Web Extension API specific download request
  • Field Details

    • request

      @NonNull public final WebRequest request
      Regular GeckoView WebRequest object
    • downloadFlags

      public final int downloadFlags
      Optional fetch flags for GeckoWebExecutor
    • filename

      @Nullable public final String filename
      A file path relative to the default downloads directory
    • conflictActionFlag

      public final int conflictActionFlag
      The action you want taken if there is a filename conflict, as defined here
    • saveAs

      public final boolean saveAs
      Specifies whether to provide a file chooser dialog to allow the user to select a filename (true), or not (false)
    • allowHttpErrors

      public final boolean allowHttpErrors
      Flag 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_UNIQUIFY
      The app should modify the filename to make it unique
      See Also:
    • CONFLICT_ACTION_OVERWRITE

      public static final int CONFLICT_ACTION_OVERWRITE
      The app should overwrite the old file with the newly-downloaded file
      See Also:
    • CONFLICT_ACTION_PROMPT

      public static final int CONFLICT_ACTION_PROMPT
      The 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)