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 voidonAddressSave(Autocomplete.Address address) Request saving or updating of the given address entry.default GeckoResult<Autocomplete.CreditCard[]>Request credit card entries.default voidonCreditCardSave(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 voidRequest saving or updating of the given login entry.default voidonLoginUsed(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
GeckoResultthat completes with an array ofAutocomplete.LoginEntrycontaining the existing logins for the given domain.
-
onLoginFetch
Request login entries for all domains.- Returns:
- A
GeckoResultthat completes with an array ofAutocomplete.LoginEntrycontaining 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
GeckoResultthat completes with an array ofAutocomplete.CreditCardcontaining 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
GeckoResultthat completes with an array ofAutocomplete.Addresscontaining the existing addresses.
-
onLoginSave
Request saving or updating of the given login entry. This is triggered by confirming aonLoginSaverequest.- Parameters:
login- TheAutocomplete.LoginEntryas confirmed by the prompt request.
-
onCreditCardSave
Request saving or updating of the given credit card entry. This is triggered by confirming aonCreditCardSaverequest.- Parameters:
creditCard- TheAutocomplete.CreditCardas confirmed by the prompt request.
-
onAddressSave
Request saving or updating of the given address entry. This is triggered by confirming aonAddressSaverequest.- Parameters:
address- TheAutocomplete.Addressas 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.LoginEntrythat was used for the autofilling.usedFields- The login entry fields used for autofilling. A combination ofAutocomplete.UsedField.
-