ExtensionInfo class
Information about an installed extension, app, or theme.
class ExtensionInfo extends ChromeObject { ExtensionInfo({String id, String name, String shortName, String description, String version, bool mayDisable, bool enabled, String disabledReason, String type, String appLaunchUrl, String homepageUrl, String updateUrl, bool offlineEnabled, String optionsUrl, List<IconInfo> icons, List<String> permissions, List<String> hostPermissions, String installType}) { if (id != null) this.id = id; if (name != null) this.name = name; if (shortName != null) this.shortName = shortName; if (description != null) this.description = description; if (version != null) this.version = version; if (mayDisable != null) this.mayDisable = mayDisable; if (enabled != null) this.enabled = enabled; if (disabledReason != null) this.disabledReason = disabledReason; if (type != null) this.type = type; if (appLaunchUrl != null) this.appLaunchUrl = appLaunchUrl; if (homepageUrl != null) this.homepageUrl = homepageUrl; if (updateUrl != null) this.updateUrl = updateUrl; if (offlineEnabled != null) this.offlineEnabled = offlineEnabled; if (optionsUrl != null) this.optionsUrl = optionsUrl; if (icons != null) this.icons = icons; if (permissions != null) this.permissions = permissions; if (hostPermissions != null) this.hostPermissions = hostPermissions; if (installType != null) this.installType = installType; } ExtensionInfo.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy); /** * The extension's unique identifier. */ String get id => jsProxy['id']; set id(String value) => jsProxy['id'] = value; /** * The name of this extension, app, or theme. */ String get name => jsProxy['name']; set name(String value) => jsProxy['name'] = value; /** * A short version of the name of this extension, app, or theme. */ String get shortName => jsProxy['shortName']; set shortName(String value) => jsProxy['shortName'] = value; /** * The description of this extension, app, or theme. */ String get description => jsProxy['description']; set description(String value) => jsProxy['description'] = value; /** * The [version](manifest/version.html) of this extension, app, or theme. */ String get version => jsProxy['version']; set version(String value) => jsProxy['version'] = value; /** * Whether this extension can be disabled or uninstalled by the user. */ bool get mayDisable => jsProxy['mayDisable']; set mayDisable(bool value) => jsProxy['mayDisable'] = value; /** * Whether it is currently enabled or disabled. */ bool get enabled => jsProxy['enabled']; set enabled(bool value) => jsProxy['enabled'] = value; /** * A reason the item is disabled. * enum of `unknown`, `permissions_increase` */ String get disabledReason => jsProxy['disabledReason']; set disabledReason(String value) => jsProxy['disabledReason'] = value; /** * The type of this extension, app, or theme. * enum of `extension`, `hosted_app`, `packaged_app`, `legacy_packaged_app`, * `theme` */ String get type => jsProxy['type']; set type(String value) => jsProxy['type'] = value; /** * The launch url (only present for apps). */ String get appLaunchUrl => jsProxy['appLaunchUrl']; set appLaunchUrl(String value) => jsProxy['appLaunchUrl'] = value; /** * The URL of the homepage of this extension, app, or theme. */ String get homepageUrl => jsProxy['homepageUrl']; set homepageUrl(String value) => jsProxy['homepageUrl'] = value; /** * The update URL of this extension, app, or theme. */ String get updateUrl => jsProxy['updateUrl']; set updateUrl(String value) => jsProxy['updateUrl'] = value; /** * Whether the extension, app, or theme declares that it supports offline. */ bool get offlineEnabled => jsProxy['offlineEnabled']; set offlineEnabled(bool value) => jsProxy['offlineEnabled'] = value; /** * The url for the item's options page, if it has one. */ String get optionsUrl => jsProxy['optionsUrl']; set optionsUrl(String value) => jsProxy['optionsUrl'] = value; /** * A list of icon information. Note that this just reflects what was declared * in the manifest, and the actual image at that url may be larger or smaller * than what was declared, so you might consider using explicit width and * height attributes on img tags referencing these images. See the [manifest * documentation on icons](manifest/icons.html) for more details. */ List<IconInfo> get icons => listify(jsProxy['icons'], _createIconInfo); set icons(List<IconInfo> value) => jsProxy['icons'] = jsify(value); /** * Returns a list of API based permissions. */ List<String> get permissions => listify(jsProxy['permissions']); set permissions(List<String> value) => jsProxy['permissions'] = jsify(value); /** * Returns a list of host based permissions. */ List<String> get hostPermissions => listify(jsProxy['hostPermissions']); set hostPermissions(List<String> value) => jsProxy['hostPermissions'] = jsify(value); /** * How the extension was installed. One of<br>[admin]: The extension was * installed because of an administrative policy,<br>[development]: The * extension was loaded unpacked in developer mode,<br>[normal]: The extension * was installed normally via a .crx file,<br>[sideload]: The extension was * installed by other software on the machine,<br>[other]: The extension was * installed by other means. * enum of `admin`, `development`, `normal`, `sideload`, `other` */ String get installType => jsProxy['installType']; set installType(String value) => jsProxy['installType'] = value; }
Extends
ChromeObject > ExtensionInfo
Constructors
new ExtensionInfo({String id, String name, String shortName, String description, String version, bool mayDisable, bool enabled, String disabledReason, String type, String appLaunchUrl, String homepageUrl, String updateUrl, bool offlineEnabled, String optionsUrl, List<IconInfo> icons, List<String> permissions, List<String> hostPermissions, String installType}) #
Create a new instance of a ChromeObject
, which creates and delegates to
a JsObject proxy.
ExtensionInfo({String id, String name, String shortName, String description, String version, bool mayDisable, bool enabled, String disabledReason, String type, String appLaunchUrl, String homepageUrl, String updateUrl, bool offlineEnabled, String optionsUrl, List<IconInfo> icons, List<String> permissions, List<String> hostPermissions, String installType}) { if (id != null) this.id = id; if (name != null) this.name = name; if (shortName != null) this.shortName = shortName; if (description != null) this.description = description; if (version != null) this.version = version; if (mayDisable != null) this.mayDisable = mayDisable; if (enabled != null) this.enabled = enabled; if (disabledReason != null) this.disabledReason = disabledReason; if (type != null) this.type = type; if (appLaunchUrl != null) this.appLaunchUrl = appLaunchUrl; if (homepageUrl != null) this.homepageUrl = homepageUrl; if (updateUrl != null) this.updateUrl = updateUrl; if (offlineEnabled != null) this.offlineEnabled = offlineEnabled; if (optionsUrl != null) this.optionsUrl = optionsUrl; if (icons != null) this.icons = icons; if (permissions != null) this.permissions = permissions; if (hostPermissions != null) this.hostPermissions = hostPermissions; if (installType != null) this.installType = installType; }
new ExtensionInfo.fromProxy(JsObject jsProxy) #
Create a new instance of a ChromeObject
, which delegates to the given
JsObject proxy.
ExtensionInfo.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);
Properties
String appLaunchUrl #
The launch url (only present for apps).
String get appLaunchUrl => jsProxy['appLaunchUrl'];
set appLaunchUrl(String value) => jsProxy['appLaunchUrl'] = value;
String description #
The description of this extension, app, or theme.
String get description => jsProxy['description'];
set description(String value) => jsProxy['description'] = value;
String disabledReason #
A reason the item is disabled.
enum of unknown
, permissions_increase
String get disabledReason => jsProxy['disabledReason'];
set disabledReason(String value) => jsProxy['disabledReason'] = value;
bool enabled #
Whether it is currently enabled or disabled.
bool get enabled => jsProxy['enabled'];
set enabled(bool value) => jsProxy['enabled'] = value;
String homepageUrl #
The URL of the homepage of this extension, app, or theme.
String get homepageUrl => jsProxy['homepageUrl'];
set homepageUrl(String value) => jsProxy['homepageUrl'] = value;
List<String> hostPermissions #
Returns a list of host based permissions.
List<String> get hostPermissions => listify(jsProxy['hostPermissions']);
set hostPermissions(List<String> value) => jsProxy['hostPermissions'] = jsify(value);
List<IconInfo> icons #
A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the manifest documentation on icons for more details.
List<IconInfo> get icons => listify(jsProxy['icons'], _createIconInfo);
set icons(List<IconInfo> value) => jsProxy['icons'] = jsify(value);
String id #
The extension's unique identifier.
String get id => jsProxy['id'];
set id(String value) => jsProxy['id'] = value;
String installType #
How the extension was installed. One of<br>admin
: The extension was
installed because of an administrative policy,<br>development
: The
extension was loaded unpacked in developer mode,<br>normal
: The extension
was installed normally via a .crx file,<br>sideload
: The extension was
installed by other software on the machine,<br>other
: The extension was
installed by other means.
enum of admin
, development
, normal
, sideload
, other
String get installType => jsProxy['installType'];
set installType(String value) => jsProxy['installType'] = value;
bool mayDisable #
Whether this extension can be disabled or uninstalled by the user.
bool get mayDisable => jsProxy['mayDisable'];
set mayDisable(bool value) => jsProxy['mayDisable'] = value;
String name #
The name of this extension, app, or theme.
String get name => jsProxy['name'];
set name(String value) => jsProxy['name'] = value;
bool offlineEnabled #
Whether the extension, app, or theme declares that it supports offline.
bool get offlineEnabled => jsProxy['offlineEnabled'];
set offlineEnabled(bool value) => jsProxy['offlineEnabled'] = value;
String optionsUrl #
The url for the item's options page, if it has one.
String get optionsUrl => jsProxy['optionsUrl'];
set optionsUrl(String value) => jsProxy['optionsUrl'] = value;
List<String> permissions #
Returns a list of API based permissions.
List<String> get permissions => listify(jsProxy['permissions']);
set permissions(List<String> value) => jsProxy['permissions'] = jsify(value);
String shortName #
A short version of the name of this extension, app, or theme.
String get shortName => jsProxy['shortName'];
set shortName(String value) => jsProxy['shortName'] = value;
String type #
The type of this extension, app, or theme.
enum of extension
, hosted_app
, packaged_app
, legacy_packaged_app
,
theme
String get type => jsProxy['type'];
set type(String value) => jsProxy['type'] = value;
String updateUrl #
The update URL of this extension, app, or theme.
String get updateUrl => jsProxy['updateUrl'];
set updateUrl(String value) => jsProxy['updateUrl'] = value;
Methods
String toString() #
Returns a string representation of this object.
String toString() => jsProxy.toString();