@UiThread
public static interface WebExtensionController.PromptDelegate
permissions.request
Modifier and Type | Method and Description |
---|---|
default GeckoResult<AllowOrDeny> |
onInstallPrompt(WebExtension extension)
Called whenever a new extension is being installed.
|
default GeckoResult<AllowOrDeny> |
onUpdatePrompt(WebExtension currentlyInstalled,
WebExtension updatedExtension,
String[] newPermissions,
String[] newOrigins)
Called whenever an updated extension has new permissions.
|
@Nullable default GeckoResult<AllowOrDeny> onInstallPrompt(@NonNull WebExtension extension)
extension
- The WebExtension
that is about to be installed.
You can use WebExtension.metaData
to gather information
about this extension when building the user prompt dialog.GeckoResult
that completes to either ALLOW
if this extension should be installed or DENY
if
this extension should not be installed. A null value will be interpreted as
DENY
.@Nullable default GeckoResult<AllowOrDeny> onUpdatePrompt(@NonNull WebExtension currentlyInstalled, @NonNull WebExtension updatedExtension, @NonNull String[] newPermissions, @NonNull String[] newOrigins)
currentlyInstalled
- The WebExtension
that is currently installed.updatedExtension
- The WebExtension
that will replace the previous extension.newPermissions
- The new permissions that are needed.newOrigins
- The new origins that are needed.GeckoResult
that completes to either ALLOW
if this extension should be update or DENY
if
this extension should not be update. A null value will be interpreted as
DENY
.