Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.ButtonPrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.ButtonPrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.ButtonPrompt
extends GeckoSession.PromptDelegate.BasePrompt
ButtonPrompt contains the information necessary to represent a JavaScript confirm() call from
content.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceButton type definitions for prompt responses.static classButton prompt types: positive (e.g.Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe message to be displayed with this prompt; may be null.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedButtonPrompt(String id, String title, String message, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a ButtonPrompt for JavaScript confirm() dialogs. -
Method Summary
Modifier and TypeMethodDescriptionconfirm(int selection) Confirms this prompt, returning the selected button to content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, dismiss, getDelegate, isComplete, setDelegate
-
Field Details
-
message
The message to be displayed with this prompt; may be null.
-
-
Constructor Details
-
ButtonPrompt
protected ButtonPrompt(@NonNull String id, @Nullable String title, @Nullable String message, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructs a ButtonPrompt for JavaScript confirm() dialogs.- Parameters:
id- the unique identifier for this prompttitle- optional title text; may be nullmessage- the message to display; may be nullobserver- observer to notify when the prompt is completed
-
-
Method Details
-
confirm
Confirms this prompt, returning the selected button to content.- Parameters:
selection- An int representing the selected button, must be one ofGeckoSession.PromptDelegate.ButtonPrompt.Type.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-