Class WebExtension.MetaData

Enclosing class:

public class WebExtension.MetaData extends Object
Provides information about a WebExtension.
  • Field Details

    • icon

      @NonNull public final Image icon
      Main Image branding for this WebExtension. Can be used when displaying prompts.
    • promptPermissions

      @Deprecated @DeprecationSchedule(id="web-extension-required-permissions", version=133) @NonNull public final String[] promptPermissions
      Use requiredPermissions instead.
    • permissions

      @Deprecated @DeprecationSchedule(id="web-extension-required-permissions", version=133) @NonNull public final String[] permissions
      Use requiredPermissions instead.
    • requiredPermissions

      @NonNull public final String[] requiredPermissions
      Required permissions for this extension.

      See API permissions .

    • origins

      @Deprecated @DeprecationSchedule(id="web-extension-required-origins", version=133) @NonNull public final String[] origins
      Use requiredOrigins instead.
    • requiredOrigins

      @NonNull public final String[] requiredOrigins
      Required origin permissions for this extension.

      See Host permissions .

    • optionalPermissions

      @NonNull public final String[] optionalPermissions
      Optional permissions for this extension.

      See API permissions .

    • grantedOptionalPermissions

      @NonNull public final String[] grantedOptionalPermissions
      Granted optional permissions for this extension.

      See API permissions .

    • optionalOrigins

      @NonNull public final String[] optionalOrigins
      Optional origin permissions for this extension.

      See Host permissions .

    • grantedOptionalOrigins

      @NonNull public final String[] grantedOptionalOrigins
      Granted optional origin permissions for this extension.

      See Host permissions .

    • name

      @Nullable public final String name
      Branding name for this extension.

      See manifest.json/name

    • description

      @Nullable public final String description
      Branding description for this extension. This string will be localized using the current GeckoView language setting.

      See manifest.json/description

    • fullDescription

      @Nullable public final String fullDescription
      The full description of this extension. See: `AddonWrapper.fullDescription`.
    • averageRating

      public final double averageRating
      The average rating of this extension. See: `AddonWrapper.averageRating`.
    • reviewCount

      public final int reviewCount
      The review count for this extension. See: `AddonWrapper.reviewCount`.
    • reviewUrl

      @Nullable public final String reviewUrl
      The link to the review page for this extension. See `AddonWrapper.reviewURL`.
    • updateDate

      @Nullable public final String updateDate
      The string representation of the date that this extension was most recently updated (simplified ISO 8601 format). See `AddonWrapper.updateDate`.
    • downloadUrl

      @Nullable public final String downloadUrl
      The URL used to install this extension. See: `AddonInternal.sourceURI`.
    • version

      @NonNull public final String version
      Version string for this extension.

      See manifest.json/version

    • creatorName

      @Nullable public final String creatorName
      Creator name as provided in the manifest.

      See manifest.json/developer

    • creatorUrl

      @Nullable public final String creatorUrl
      Creator url as provided in the manifest.

      See manifest.json/developer

    • homepageUrl

      @Nullable public final String homepageUrl
      Homepage url as provided in the manifest.

      See manifest.json/homepage_url

    • optionsPageUrl

      @Nullable public final String optionsPageUrl
      Options page as provided in the manifest.

      See manifest.json/options_ui

    • openOptionsPageInTab

      public final boolean openOptionsPageInTab
      Whether the options page should be open in a Tab or not.

      See manifest.json/options_ui#Syntax

    • isRecommended

      public final boolean isRecommended
      Whether or not this is a recommended extension.

      See Recommended Extensions program

    • blocklistState

      public final int blocklistState
    • signedState

      public final int signedState
      Signed status for this extension.

      See Add-on signing in Firefox. .

    • disabledFlags

      public final int disabledFlags
      Disabled binary flags for this extension.

      This will be either equal to 0 if the extension is enabled or will contain one or more flags from WebExtension.DisabledFlags.

      e.g. if the extension has been disabled by the user, the value in WebExtension.DisabledFlags.USER will be equal to 1:

           boolean isUserDisabled = metaData.disabledFlags
                & DisabledFlags.USER > 0;
    • baseUrl

      @NonNull public final String baseUrl
      Root URL for this extension's pages. Can be used to determine if a given URL belongs to this extension.
    • allowedInPrivateBrowsing

      public final boolean allowedInPrivateBrowsing
      Whether this extension is allowed to run in private browsing or not. To modify this value use WebExtensionController.setAllowedInPrivateBrowsing(org.mozilla.geckoview.WebExtension, boolean).
    • enabled

      public final boolean enabled
      Whether this extension is enabled or not.
    • temporary

      public final boolean temporary
      Whether this extension is temporary or not. Temporary extensions are not retained and will be uninstalled when the browser exits.
    • amoListingUrl

      @Nullable public final String amoListingUrl
      The link to the AMO detail page for this extension. See `AddonWrapper.amoListingURL`.
    • incognito

      @Nullable public final String incognito
      Indicates how the extension works with private browsing windows.

      See manifest.json/incognito

  • Constructor Details

    • MetaData

      protected MetaData()
      Override for testing.