Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(490)

Unified Diff: chrome/common/extensions/api/developer_private.idl

Issue 989813002: [Extensions] Make a chrome.developerPrivate.getExtensionsInfo function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/developer_private.idl
diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl
index 0d61886ebd28e569a167469621e41728217ec018..5b3d61c3a6fee86ea29e4c865d43b5e107a99139 100644
--- a/chrome/common/extensions/api/developer_private.idl
+++ b/chrome/common/extensions/api/developer_private.idl
@@ -7,6 +7,7 @@
// apps and extensions.
namespace developerPrivate {
+ // DEPRECATED: Prefer ExtensionType.
enum ItemType {
hosted_app,
packaged_app,
@@ -15,6 +16,7 @@ namespace developerPrivate {
theme
};
+ // DEPRECATED: Prefer ExtensionView.
dictionary ItemInspectView {
// path to the inspect page.
DOMString path;
@@ -31,6 +33,137 @@ namespace developerPrivate {
DOMString message;
};
+ enum ExtensionType {
+ HOSTED_APP,
+ PLATFORM_APP,
+ LEGACY_PACKAGED_APP,
+ EXTENSION,
+ THEME,
+ SHARED_MODULE
+ };
+
+ enum Location {
+ FROM_STORE,
+ UNPACKED,
+ THIRD_PARTY,
+ // "Unknown" includes crx's installed from chrome://extensions.
not at google - send to devlin 2015/03/11 17:43:05 Why not make it known then (even if whoever uses t
Devlin 2015/03/11 21:45:54 We don't have an easy way of knowing. We can alwa
+ UNKNOWN
+ };
+
+ enum ErrorType {
+ MANIFEST,
+ RUNTIME
+ };
+
+ enum ErrorSeverity {
+ LOG,
+ WARN,
+ ERROR
+ };
+
+ enum ExtensionState {
+ ENABLED,
+ DISABLED,
+ TERMINATED
+ };
+
+ dictionary AccessModifier {
+ boolean isEnabled;
+ boolean isActive;
+ };
+
+ dictionary StackFrame {
+ long lineNumber;
+ long columnNumber;
+ DOMString source;
+ DOMString function;
+ };
+
+ dictionary ErrorBase {
+ ErrorType type;
+ DOMString extensionId;
+ boolean fromIncognito;
+ DOMString source;
+ DOMString message;
+ };
+
+ dictionary ManifestError {
+ ErrorBase base;
+ DOMString manifestKey;
+ DOMString? manifestSpecific;
not at google - send to devlin 2015/03/11 17:43:05 What is this? I can't tell from just the name of t
Devlin 2015/03/11 21:45:54 It's the "specific" part of the manifest key that
+ };
+
+ dictionary RuntimeError {
+ ErrorBase base;
+ ErrorSeverity severity;
+ long occurrences;
+ long renderViewId;
+ long renderProcessId;
+ boolean canInspect;
+ StackFrame[] stackTrace;
+ };
+
+ dictionary DisableReasons {
+ boolean suspiciousInstall;
+ boolean corruptInstall;
+ boolean updateRequired;
+ };
+
+ dictionary OptionsPage {
+ boolean openInTab;
+ DOMString url;
+ };
+
+ dictionary HomePage {
+ DOMString url;
+ boolean specified;
+ };
+
+ dictionary ExtensionView {
+ DOMString path;
+ long renderProcessId;
+ long renderViewId;
+ boolean incognito;
+ boolean generatedBackgroundPage;
+ };
+
+ dictionary ExtensionInfo {
+ boolean actionButtonHidden; // enable_show_button
+ DOMString? blacklistText;
+ DOMString[] dependentExtensions;
+ DOMString description;
+ DisableReasons disableReasons; //suspicious, corrupt, updaterequired
+ AccessModifier errorCollection; // errorCollectionEd, wantsErrorCollection;
+ AccessModifier fileAccess; // allowFileAccess, wantsFileAccess
+ HomePage homePage; // homepageProvided && homepageUrl
+ DOMString iconUrl; // icon
+ DOMString id;
+ AccessModifier incognitoAccess; // enabled/can be enabled incognito
+ boolean installedByCustodian;
+ DOMString[] installWarnings;
+ DOMString? launchUrl;
+ Location location; // is_unpacked, is from store, allow reload
+ DOMString? locationText;
+ ManifestError[] manifestErrors;
+ boolean mustRemainInstalled; // recommendedInstall
+ DOMString name;
+ boolean offlineEnabled;
+ OptionsPage? optionsPage;
+ DOMString? path;
+ DOMString? policyText;
+ DOMString? prettifiedPath;
+ AccessModifier runOnAllUrls; // allowAllUrls, showAllUrls
+ RuntimeError[] runtimeErrors;
+ DOMString[] runtimeWarnings; // warnings
+ ExtensionState state;
+ ExtensionType type; // is_hosted_app, is_platform_app, etc
+ DOMString updateUrl;
+ boolean userMayModify; // managed install
+ DOMString version;
+ ExtensionView[] views;
+ };
+
+ // DEPRECATED: Prefer ExtensionInfo.
dictionary ItemInfo {
DOMString id;
DOMString name;
@@ -60,14 +193,19 @@ namespace developerPrivate {
DOMString? homepage_url;
DOMString? update_url;
InstallWarning[] install_warnings;
- any[] manifest_errors;
- any[] runtime_errors;
+ ManifestError[] manifest_errors;
+ RuntimeError[] runtime_errors;
boolean offline_enabled;
// All views of the current extension.
ItemInspectView[] views;
};
+ dictionary GetExtensionsInfoOptions {
+ boolean? includeDisabled;
+ boolean? includeTerminated;
+ };
+
dictionary InspectOptions {
DOMString extension_id;
DOMString render_process_id;
@@ -199,6 +337,8 @@ namespace developerPrivate {
callback VoidCallback = void ();
callback BooleanCallback = void (boolean result);
+ callback ExtensionInfosCallback = void (ExtensionInfo[] result);
+ callback ExtensionInfoCallback = void (ExtensionInfo result);
callback ItemsInfoCallback = void (ItemInfo[] result);
callback GetProjectsInfoCallback = void (ProjectInfo[] result);
callback PathCallback = void (DOMString path);
@@ -214,9 +354,22 @@ namespace developerPrivate {
static void autoUpdate(optional BooleanCallback callback);
// Returns information of all the extensions and apps installed.
+ // |options| : Options to restrict the items returned.
+ // |callback| : Called with extensions info.
+ static void getExtensionsInfo(optional GetExtensionsInfoOptions options,
+ ExtensionInfosCallback callback);
+
+ // Returns information of a particular extension.
+ // |id| : The id of the extension.
+ // |callback| : Called with the result.
+ static void getExtensionInfo(DOMString id,
+ ExtensionInfoCallback callback);
+
+ // Returns information of all the extensions and apps installed.
// |includeDisabled| : include disabled items.
// |includeTerminated| : include terminated items.
// |callback| : Called with items info.
+ // DEPRECATED: Prefer getExtensionsInfo.
static void getItemsInfo(boolean includeDisabled,
boolean includeTerminated,
ItemsInfoCallback callback);

Powered by Google App Engine
This is Rietveld 408576698