Interface GeckoSession.PromptDelegate
- Enclosing class:
- GeckoSession
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAlertPrompt contains the information necessary to represent a JavaScript alert() call from content; it can only be dismissed, not confirmed.static classAuthPrompt contains the information necessary to represent an HTML authorization prompt generated by content.static classRequest containing information required to resolve Autocomplete prompt requests.static classCore prompt container that manages confirmation, dismissal, and observer notification.static classBeforeUnloadPrompt represents the onbeforeunload prompt.static classButtonPrompt contains the information necessary to represent a JavaScript confirm() call from content.static classCertificateRequest represents a request for a client authentication certificate.static classChoicePrompt contains the information necessary to display a menu or list prompt generated by content.static classColorPrompt contains the information necessary to represent a prompt for color input generated by content.static classDateTimePrompt contains the information necessary to represent a prompt for date and/or time input generated by content.static classFilePrompt contains the information necessary to represent a prompt for a file or files generated by content.static classFolderUploadPrompt represents a prompt shown whenever the browser needs to upload folder datastatic final classContains all the Identity credential prompts (FedCM)static classPopupPrompt contains the information necessary to represent a popup blocking request.static interfaceInterface for receiving lifecycle events on a specific prompt instance.static classPromptResponse is an opaque class created upon confirming or dismissing a prompt.static classRedirectPrompt contains the information necessary to represent a redirect blocking request.static classRepostConfirmPrompt represents a prompt shown whenever the browser needs to resubmit POST data (e.g.static classSharePrompt contains the information necessary to represent a (v1) WebShare request.static classTextPrompt 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.Display a folder upload 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.onRedirectPrompt(GeckoSession session, GeckoSession.PromptDelegate.RedirectPrompt prompt) Display a redirect request prompt; this occurs when a third-party frame attempts to redirect the top-level window in a way that doesn't appear to be the result of user input.Display a POST resubmission confirmation prompt.onRequestCertificate(GeckoSession session, GeckoSession.PromptDelegate.CertificateRequest request) Handle a request for a client authentication certificate.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.AlertPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.BeforeUnloadPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving toAllowOrDeny.ALLOWif the page is allowed to continue with the navigation orAllowOrDeny.DENYotherwise.
-
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.RepostConfirmPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving toAllowOrDeny.ALLOWif the page is allowed to continue with the navigation and resubmit the POST data orAllowOrDeny.DENYotherwise.
-
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.ButtonPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich includes all necessary information to resolve the prompt.
-
onFolderUploadPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onFolderUploadPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.FolderUploadPrompt prompt) Display a folder upload prompt.- Parameters:
session- GeckoSession that triggered the prompt.prompt- TheGeckoSession.PromptDelegate.FolderUploadPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.TextPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.AuthPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.ChoicePromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.ColorPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.DateTimePromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.FilePromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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.PopupPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich includes all necessary information to resolve the prompt.
-
onRedirectPrompt
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onRedirectPrompt(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.RedirectPrompt prompt) Display a redirect request prompt; this occurs when a third-party frame attempts to redirect the top-level 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.RedirectPromptthat describes the prompt.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponse.Confirm the request with an
Autocomplete.Optionto 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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponse.Confirm the request with an
Autocomplete.Optionto 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.
-
onRequestCertificate
@UiThread @Nullable default GeckoResult<GeckoSession.PromptDelegate.PromptResponse> onRequestCertificate(@NonNull GeckoSession session, @NonNull GeckoSession.PromptDelegate.CertificateRequest request) Handle a request for a client authentication certificate. This will occur when a host requests one during the TLS handshake.- Parameters:
session- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.CertificateRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponse.
-
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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponse.Confirm the request with an
Autocomplete.Optionto 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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponseConfirm the request with an
Autocomplete.Optionto 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- TheGeckoSessionthat triggered the request.prompt- TheGeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPromptcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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- TheGeckoSessionthat triggered the request.prompt- TheGeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPromptcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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- TheGeckoSessionthat triggered the request.prompt- TheGeckoSession.PromptDelegate.IdentityCredential.PrivacyPolicyPromptcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponsewhich 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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponseConfirm the request with an
Autocomplete.Optionto 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- TheGeckoSessionthat triggered the request.request- TheGeckoSession.PromptDelegate.AutocompleteRequestcontaining the request details.- Returns:
- A
GeckoResultresolving to aGeckoSession.PromptDelegate.PromptResponseConfirm the request with an
Autocomplete.Optionto 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.
-