Package org.mozilla.geckoview
Class GeckoSession.PromptDelegate.SharePrompt
Object
org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
org.mozilla.geckoview.GeckoSession.PromptDelegate.SharePrompt
- Enclosing interface:
- GeckoSession.PromptDelegate
public static class GeckoSession.PromptDelegate.SharePrompt
extends GeckoSession.PromptDelegate.BasePrompt
SharePrompt contains the information necessary to represent a (v1) WebShare request.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPossible results to aGeckoSession.PromptDelegate.SharePrompt.static @interfaceShare result type definitions for share operation outcomes.Nested classes/interfaces inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
GeckoSession.PromptDelegate.BasePrompt.Observer -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringThe text for the share request.final StringThe uri for the share request.Fields inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
title -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSharePrompt(String id, String title, String text, String uri, GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructor for SharePrompt carrying share text and URI. -
Method Summary
Modifier and TypeMethodDescriptionconfirm(int response) Confirms the prompt and either blocks or allows the share request.dismiss()Dismisses the prompt and returnsGeckoSession.PromptDelegate.SharePrompt.Result.ABORTto web content.Methods inherited from class org.mozilla.geckoview.GeckoSession.PromptDelegate.BasePrompt
confirm, getDelegate, isComplete, setDelegate
-
Field Details
-
text
The text for the share request. -
uri
The uri for the share request.
-
-
Constructor Details
-
SharePrompt
protected SharePrompt(@NonNull String id, @Nullable String title, @Nullable String text, @Nullable String uri, @NonNull GeckoSession.PromptDelegate.BasePrompt.Observer observer) Constructor for SharePrompt carrying share text and URI.- Parameters:
id- Unique identifier for this prompt.title- Optional title for the share prompt; may be null.text- The text to share; may be null.uri- The URI to share; may be null.observer- Observer to notify when the prompt is completed.
-
-
Method Details
-
confirm
Confirms the prompt and either blocks or allows the share request.- Parameters:
response- One ofGeckoSession.PromptDelegate.SharePrompt.Resultspecifying the outcome of the share attempt.- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-
dismiss
Dismisses the prompt and returnsGeckoSession.PromptDelegate.SharePrompt.Result.ABORTto web content.- Overrides:
dismissin classGeckoSession.PromptDelegate.BasePrompt- Returns:
- A
GeckoSession.PromptDelegate.PromptResponsewhich can be used to complete theGeckoResultassociated with this prompt.
-