Interface Autocomplete.StorageDelegate

Enclosing class:
Autocomplete

public static interface Autocomplete.StorageDelegate
Implement this interface to handle runtime login storage requests. Login storage events include login entry requests for autofill and autocompletion of login input fields. This delegate is attached to the runtime via GeckoRuntime.setAutocompleteStorageDelegate(org.mozilla.geckoview.Autocomplete.StorageDelegate).
  • Method Details

    • onLoginFetch

      @UiThread @Nullable default GeckoResult<Autocomplete.LoginEntry[]> onLoginFetch(@NonNull String domain)
      Request login entries for a given domain. While processing the web document, we have identified elements resembling login input fields suitable for autofill. We will attempt to match the provided login information to the identified input fields.
      Parameters:
      domain - The domain string for the requested logins.
      Returns:
      A GeckoResult that completes with an array of Autocomplete.LoginEntry containing the existing logins for the given domain.
    • onLoginFetch

      @UiThread @Nullable default GeckoResult<Autocomplete.LoginEntry[]> onLoginFetch()
      Request login entries for all domains.
      Returns:
      A GeckoResult that completes with an array of Autocomplete.LoginEntry containing the existing logins.
    • onCreditCardFetch

      @UiThread @Nullable default GeckoResult<Autocomplete.CreditCard[]> onCreditCardFetch()
      Request credit card entries. While processing the web document, we have identified elements resembling credit card input fields suitable for autofill. We will attempt to match the provided credit card information to the identified input fields.
      Returns:
      A GeckoResult that completes with an array of Autocomplete.CreditCard containing the existing credit cards.
    • onAddressFetch

      @UiThread @Nullable default GeckoResult<Autocomplete.Address[]> onAddressFetch()
      Request address entries. While processing the web document, we have identified elements resembling address input fields suitable for autofill. We will attempt to match the provided address information to the identified input fields.
      Returns:
      A GeckoResult that completes with an array of Autocomplete.Address containing the existing addresses.
    • onLoginSave

      @UiThread default void onLoginSave(@NonNull Autocomplete.LoginEntry login)
      Request saving or updating of the given login entry. This is triggered by confirming a onLoginSave request.
      Parameters:
      login - The Autocomplete.LoginEntry as confirmed by the prompt request.
    • onCreditCardSave

      @UiThread default void onCreditCardSave(@NonNull Autocomplete.CreditCard creditCard)
      Request saving or updating of the given credit card entry. This is triggered by confirming a onCreditCardSave request.
      Parameters:
      creditCard - The Autocomplete.CreditCard as confirmed by the prompt request.
    • onAddressSave

      @UiThread default void onAddressSave(@NonNull Autocomplete.Address address)
      Request saving or updating of the given address entry. This is triggered by confirming a onAddressSave request.
      Parameters:
      address - The Autocomplete.Address as confirmed by the prompt request.
    • onLoginUsed

      @UiThread default void onLoginUsed(@NonNull Autocomplete.LoginEntry login, int usedFields)
      Notify that the given login was used to autofill login input fields. This is triggered by autofilling elements with unmodified login entries as provided via onLoginFetch(java.lang.String).
      Parameters:
      login - The Autocomplete.LoginEntry that was used for the autofilling.
      usedFields - The login entry fields used for autofilling. A combination of Autocomplete.UsedField.