Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.BasePrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
- Direct Known Subclasses:
GeckoSession.PromptDelegate.AlertPrompt,GeckoSession.PromptDelegate.AuthPrompt,GeckoSession.PromptDelegate.AutocompleteRequest,GeckoSession.PromptDelegate.BeforeUnloadPrompt,GeckoSession.PromptDelegate.ButtonPrompt,GeckoSession.PromptDelegate.CertificateRequest,GeckoSession.PromptDelegate.ChoicePrompt,GeckoSession.PromptDelegate.ColorPrompt,GeckoSession.PromptDelegate.DateTimePrompt,GeckoSession.PromptDelegate.FilePrompt,GeckoSession.PromptDelegate.FolderUploadPrompt,GeckoSession.PromptDelegate.IdentityCredential.AccountSelectorPrompt,GeckoSession.PromptDelegate.IdentityCredential.PrivacyPolicyPrompt,GeckoSession.PromptDelegate.IdentityCredential.ProviderSelectorPrompt,GeckoSession.PromptDelegate.PopupPrompt,GeckoSession.PromptDelegate.RedirectPrompt,GeckoSession.PromptDelegate.RepostConfirmPrompt,GeckoSession.PromptDelegate.SharePrompt,GeckoSession.PromptDelegate.TextPrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
Core prompt container that manages confirmation, dismissal, and observer notification.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceObserver interface for prompt completion events. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconfirm()Confirms the prompt, marking it completed and notifying its observer.dismiss()This dismisses the prompt without sending any meaningful information back to content.Get the delegate for this prompt.booleanThis returns true if the prompt has already been confirmed or dismissed.voidSet the delegate for this prompt.
-
Field Details
-
title
The title of this prompt; may be null.
-
-
Method Details
-
confirm
Confirms the prompt, marking it completed and notifying its observer.- Returns:
- a PromptResponse which can be dispatched to signal confirmation.
- Throws:
RuntimeException- if this prompt has already been completed.
-
dismiss
This dismisses the prompt without sending any meaningful information back to content.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewith which you can complete theGeckoResultthat corresponds to this prompt.
-
setDelegate
@UiThread public void setDelegate(@Nullable GeckoSession.PromptDelegate.PromptInstanceDelegate delegate) Set the delegate for this prompt.- Parameters:
delegate- theGeckoSession.PromptDelegate.PromptInstanceDelegateinstance.
-
getDelegate
Get the delegate for this prompt.- Returns:
- the
GeckoSession.PromptDelegate.PromptInstanceDelegateinstance.
-
isComplete
@UiThread public boolean isComplete()This returns true if the prompt has already been confirmed or dismissed.- Returns:
- A boolean which is true if the prompt has been confirmed or dismissed, and false otherwise.
-