public static interface WebExtension.SessionTabDelegate
Modifier and Type | Method and Description |
---|---|
default GeckoResult<AllowOrDeny> |
onCloseTab(WebExtension source,
GeckoSession session)
Called when tabs.remove is invoked, this method decides if WebExtension can close the
tab.
|
default GeckoResult<AllowOrDeny> |
onUpdateTab(WebExtension extension,
GeckoSession session,
WebExtension.UpdateTabDetails details)
Called when tabs.update is invoked.
|
@UiThread @NonNull default GeckoResult<AllowOrDeny> onCloseTab(@Nullable WebExtension source, @NonNull GeckoSession session)
source
- An instance of WebExtension
session
- An instance of GeckoSession
to be closed.@UiThread @NonNull default GeckoResult<AllowOrDeny> onUpdateTab(@NonNull WebExtension extension, @NonNull GeckoSession session, @NonNull WebExtension.UpdateTabDetails details)
loadURI
on it. The page will be loaded if
this method returns GeckoResult.ALLOW.
See also:
WebExtensions/API/tabs/updateextension
- The extension that requested to update the tab.session
- The GeckoSession
instance that needs to be updated.details
- WebExtension.UpdateTabDetails
instance that describes what
needs to be updated for this tab.GeckoResult.ALLOW
if the tab will be updated,
GeckoResult.DENY
otherwise.