Package org.mozilla.geckoview
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 Summary
Modifier and TypeMethodDescriptiondefault GeckoResult<Autocomplete.Address[]>
Request address entries.default void
onAddressSave
(Autocomplete.Address address) Request saving or updating of the given address entry.default GeckoResult<Autocomplete.CreditCard[]>
Request credit card entries.default void
onCreditCardSave
(Autocomplete.CreditCard creditCard) Request saving or updating of the given credit card entry.default GeckoResult<Autocomplete.LoginEntry[]>
Request login entries for all domains.default GeckoResult<Autocomplete.LoginEntry[]>
onLoginFetch
(String domain) Request login entries for a given domain.default void
Request saving or updating of the given login entry.default void
onLoginUsed
(Autocomplete.LoginEntry login, int usedFields) Notify that the given login was used to autofill login input fields.
-
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 ofAutocomplete.LoginEntry
containing the existing logins for the given domain.
-
onLoginFetch
Request login entries for all domains.- Returns:
- A
GeckoResult
that completes with an array ofAutocomplete.LoginEntry
containing the existing logins.
-
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 ofAutocomplete.CreditCard
containing the existing credit cards.
-
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 ofAutocomplete.Address
containing the existing addresses.
-
onLoginSave
Request saving or updating of the given login entry. This is triggered by confirming aonLoginSave
request.- Parameters:
login
- TheAutocomplete.LoginEntry
as confirmed by the prompt request.
-
onCreditCardSave
Request saving or updating of the given credit card entry. This is triggered by confirming aonCreditCardSave
request.- Parameters:
creditCard
- TheAutocomplete.CreditCard
as confirmed by the prompt request.
-
onAddressSave
Request saving or updating of the given address entry. This is triggered by confirming aonAddressSave
request.- Parameters:
address
- TheAutocomplete.Address
as confirmed by the prompt request.
-
onLoginUsed
Notify that the given login was used to autofill login input fields. This is triggered by autofilling elements with unmodified login entries as provided viaonLoginFetch(java.lang.String)
.- Parameters:
login
- TheAutocomplete.LoginEntry
that was used for the autofilling.usedFields
- The login entry fields used for autofilling. A combination ofAutocomplete.UsedField
.
-