Interface Extensions

All Superinterfaces:
Advisable<ExtensionsCallback>, Observable<ExtensionsEvent>, ProfileService

public interface Extensions extends ProfileService, Observable<ExtensionsEvent>, Advisable<ExtensionsCallback>
A service for working with Chrome extensions.
Since:
8.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    install(Path crxFile)
    Installs the Chrome extension from the given CRX file.
    Returns an immutable list of installed Chrome extensions.
    void
    uninstall(Extension extension)
    Uninstalls the given Chrome extension.

    Methods inherited from interface com.teamdev.jxbrowser.callback.Advisable

    get, remove, set

    Methods inherited from interface com.teamdev.jxbrowser.event.Observable

    on

    Methods inherited from interface com.teamdev.jxbrowser.profile.ProfileService

    profile
  • Method Details

    • list

      List<Extension> list()
      Returns an immutable list of installed Chrome extensions.
      Throws:
      ObjectClosedException - when the engine is closed or the profile is deleted
    • install

      Extension install(Path crxFile)
      Installs the Chrome extension from the given CRX file.

      The crxFile must lead to a CRX file. No publisher proof is required.

      If the extension is already installed, this method returns it.

      If the CRX file contains a newer version of the extension, this method updates the installed extension and returns an instance of the updated extension.

      Parameters:
      crxFile - the path to the extension CRX package
      Returns:
      the installed Chrome extension
      Throws:
      ExtensionInstallationException - if the extension installation has failed or if a newer version of the extension is already installed
      ObjectClosedException - when the engine is closed or the profile is deleted
    • uninstall

      void uninstall(Extension extension)
      Uninstalls the given Chrome extension.
      Parameters:
      extension - the extension to uninstall
      Throws:
      ExtensionUninstallationException - if the extension uninstallation has failed
      IllegalArgumentException - if the extension is not installed in this profile
      ObjectClosedException - when the engine is closed or the profile is deleted