Interface GeckoSession.PromptDelegate
- Enclosing class:
- GeckoSession
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
AlertPrompt contains the information necessary to represent a JavaScript alert() call from content; it can only be dismissed, not confirmed.static class
AuthPrompt contains the information necessary to represent an HTML authorization prompt generated by content.static class
Request containing information required to resolve Autocomplete prompt requests.static class
static class
BeforeUnloadPrompt represents the onbeforeunload prompt.static class
ButtonPrompt contains the information necessary to represent a JavaScript confirm() call from content.static class
ChoicePrompt contains the information necessary to display a menu or list prompt generated by content.static class
ColorPrompt contains the information necessary to represent a prompt for color input generated by content.static class
DateTimePrompt contains the information necessary to represent a prompt for date and/or time input generated by content.static class
FilePrompt contains the information necessary to represent a prompt for a file or files generated by content.static final class
Contains all the Identity credential prompts (FedCM)static class
PopupPrompt contains the information necessary to represent a popup blocking request.static interface
static class
PromptResponse is an opaque class created upon confirming or dismissing a prompt.static class
RepostConfirmPrompt represents a prompt shown whenever the browser needs to resubmit POST data (e.g.static class
SharePrompt contains the information necessary to represent a (v1) WebShare request.static class
TextPrompt contains the information necessary to represent a Javascript prompt() call from content. -
Method Summary
Modifier and TypeMethodDescriptiononAddressSave
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.AddressSaveOption> request) Handle a address save prompt request.onAddressSelect
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.AddressSelectOption> request) Handle a address selection prompt request.onAlertPrompt
(GeckoSession session, GeckoSession.PromptDelegate.AlertPrompt prompt) Display an alert prompt.onAuthPrompt
(GeckoSession session, GeckoSession.PromptDelegate.AuthPrompt prompt) Display an authorization prompt.Display a onbeforeunload prompt.onButtonPrompt
(GeckoSession session, GeckoSession.PromptDelegate.ButtonPrompt prompt) Display a button prompt.onChoicePrompt
(GeckoSession session, GeckoSession.PromptDelegate.ChoicePrompt prompt) Display a list/menu prompt.onColorPrompt
(GeckoSession session, GeckoSession.PromptDelegate.ColorPrompt prompt) Display a color prompt.onCreditCardSave
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.CreditCardSaveOption> request) Handle a credit card save prompt request.onCreditCardSelect
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.CreditCardSelectOption> request) Handle a credit card selection prompt request.onDateTimePrompt
(GeckoSession session, GeckoSession.PromptDelegate.DateTimePrompt prompt) Display a date/time prompt.onFilePrompt
(GeckoSession session, GeckoSession.PromptDelegate.FilePrompt prompt) Display a file prompt.onLoginSave
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSaveOption> request) Handle a login save prompt request.onLoginSelect
(GeckoSession session, GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSelectOption> request) Handle a login selection prompt request.onPopupPrompt
(GeckoSession session, GeckoSession.PromptDelegate.PopupPrompt prompt) Display a popup request prompt; this occurs when content attempts to open a new window in a way that doesn't appear to be the result of user input.Display a POST resubmission confirmation prompt.onSelectIdentityCredentialAccount
(GeckoSession session, GeckoSession.PromptDelegate.IdentityCredential.AccountSelectorPrompt prompt) Handle an Identity Credential Account selection prompt request.onSelectIdentityCredentialProvider
(GeckoSession session, GeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPrompt prompt) Handle an Identity Credential Provider selection prompt request.onSharePrompt
(GeckoSession session, GeckoSession.PromptDelegate.SharePrompt prompt) Display a share request prompt; this occurs when content attempts to use the WebShare API.onShowPrivacyPolicyIdentityCredential
(GeckoSession session, GeckoSession.PromptDelegate.IdentityCredential.PrivacyPolicyPrompt prompt) Handle an Identity Credential privacy policy prompt request.onTextPrompt
(GeckoSession session, GeckoSession.PromptDelegate.TextPrompt prompt) Display a text prompt.
-
Method Details
-
onAlertPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAlertPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AlertPrompt prompt) Display an alert prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.AlertPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onBeforeUnloadPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onBeforeUnloadPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.BeforeUnloadPrompt prompt) Display a onbeforeunload prompt.See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload See
GeckoSession.PromptDelegate.BeforeUnloadPrompt
- Parameters:
session
- GeckoSession that triggered the promptprompt
- theGeckoSession.PromptDelegate.BeforeUnloadPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving toAllowOrDeny.ALLOW
if the page is allowed to continue with the navigation orAllowOrDeny.DENY
otherwise.
-
onRepostConfirmPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onRepostConfirmPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.RepostConfirmPrompt prompt) Display a POST resubmission confirmation prompt.This prompt will trigger whenever refreshing or navigating to a page needs resubmitting POST data that has been submitted already.
- Parameters:
session
- GeckoSession that triggered the promptprompt
- theGeckoSession.PromptDelegate.RepostConfirmPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving toAllowOrDeny.ALLOW
if the page is allowed to continue with the navigation and resubmit the POST data orAllowOrDeny.DENY
otherwise.
-
onButtonPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onButtonPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.ButtonPrompt prompt) Display a button prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.ButtonPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onTextPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onTextPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.TextPrompt prompt) Display a text prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.TextPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onAuthPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAuthPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AuthPrompt prompt) Display an authorization prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.AuthPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onChoicePrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onChoicePrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.ChoicePrompt prompt) Display a list/menu prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.ChoicePrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onColorPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onColorPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.ColorPrompt prompt) Display a color prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.ColorPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onDateTimePrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onDateTimePrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.DateTimePrompt prompt) Display a date/time prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.DateTimePrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onFilePrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onFilePrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.FilePrompt prompt) Display a file prompt.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.FilePrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onPopupPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onPopupPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.PopupPrompt prompt) Display a popup request prompt; this occurs when content attempts to open a new window in a way that doesn't appear to be the result of user input.- Parameters:
session
- GeckoSession that triggered the prompt.prompt
- TheGeckoSession.PromptDelegate.PopupPrompt
that describes the prompt.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onLoginSave
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onLoginSave(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSaveOption> request) Handle a login save prompt request. This is triggered by the user entering new or modified login credentials into a login form.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
.Confirm the request with an
Autocomplete.Option
to trigger aAutocomplete.StorageDelegate.onLoginSave(org.mozilla.geckoview.Autocomplete.LoginEntry)
request to save the given selection. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created login entry.Dismiss the request to deny the saving request.
-
onAddressSave
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAddressSave(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.AddressSaveOption> request) Handle a address save prompt request. This is triggered by the user entering new or modified address credentials into a address form.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
.Confirm the request with an
Autocomplete.Option
to trigger aAutocomplete.StorageDelegate.onAddressSave(org.mozilla.geckoview.Autocomplete.Address)
request to save the given selection. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created address entry.Dismiss the request to deny the saving request.
-
onCreditCardSave
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onCreditCardSave(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.CreditCardSaveOption> request) Handle a credit card save prompt request. This is triggered by the user entering new or modified credit card credentials into a form.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
.Confirm the request with an
Autocomplete.Option
to trigger aAutocomplete.StorageDelegate.onCreditCardSave(org.mozilla.geckoview.Autocomplete.CreditCard)
request to save the given selection. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created credit card entry.Dismiss the request to deny the saving request.
-
onLoginSelect
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onLoginSelect(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.LoginSelectOption> request) Handle a login selection prompt request. This is triggered by the user focusing on a login username field.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
Confirm the request with an
Autocomplete.Option
to let GeckoView fill out the login forms with the given selection details. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created login entry.Dismiss the request to deny autocompletion for the detected form.
-
onSelectIdentityCredentialProvider
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onSelectIdentityCredentialProvider(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPrompt prompt) Handle an Identity Credential Provider selection prompt request. This is triggered by the user focusing on selecting a provider for authenticating.- Parameters:
session
- TheGeckoSession
that triggered the request.prompt
- TheGeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPrompt
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onSelectIdentityCredentialAccount
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onSelectIdentityCredentialAccount(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.IdentityCredential.AccountSelectorPrompt prompt) Handle an Identity Credential Account selection prompt request. This is triggered by the user focusing on selecting a provider for authenticating.- Parameters:
session
- TheGeckoSession
that triggered the request.prompt
- TheGeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPrompt
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onShowPrivacyPolicyIdentityCredential
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onShowPrivacyPolicyIdentityCredential(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.IdentityCredential.PrivacyPolicyPrompt prompt) Handle an Identity Credential privacy policy prompt request.- Parameters:
session
- TheGeckoSession
that triggered the request.prompt
- TheGeckoSession.PromptDelegate.IdentityCredential.PrivacyPolicyPrompt
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
which includes all necessary information to resolve the prompt.
-
onCreditCardSelect
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onCreditCardSelect(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.CreditCardSelectOption> request) Handle a credit card selection prompt request. This is triggered by the user focusing on a credit card input field.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
Confirm the request with an
Autocomplete.Option
to let GeckoView fill out the credit card forms with the given selection details. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created credit card entry.Dismiss the request to deny autocompletion for the detected form.
-
onAddressSelect
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onAddressSelect(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.AutocompleteRequest<Autocomplete.AddressSelectOption> request) Handle a address selection prompt request. This is triggered by the user focusing on a address field.- Parameters:
session
- TheGeckoSession
that triggered the request.request
- TheGeckoSession.PromptDelegate.AutocompleteRequest
containing the request details.- Returns:
- A
GeckoResult
resolving to aGeckoSession.PromptDelegate.PromptResponse
Confirm the request with an
Autocomplete.Option
to let GeckoView fill out the address forms with the given selection details. The confirmed selection may be an entry out of the request's options, a modified option, or a freshly created address entry.Dismiss the request to deny autocompletion for the detected form.
-