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

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
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b4c9b852a78f77a5a679f02c310e899affd69c85 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,135 @@ namespace developerPrivate {
DOMString message;
};
+ enum ExtensionType {
+ HOSTED_APP,
+ PLATFORM_APP,
+ LEGACY_PACKAGED_APP,
+ EXTENSION,
+ THEME,
+ SHARED_MODULE
+ };
+
+ enum RunStateValue {
Devlin 2015/03/07 06:16:43 On second thought, I may change this into a dictio
not at google - send to devlin 2015/03/09 18:44:01 Yes this enum doesn't make sense to me.
+ CANT_HAVE_STATE,
+ WANTS_STATE,
+ HAS_STATE
+ };
+
+ enum Location {
+ FROM_STORE,
+ UNPACKED,
+ UNKNOWN
not at google - send to devlin 2015/03/09 18:44:01 there is also local CRX's (like drag-drop into chr
Devlin 2015/03/09 19:28:20 Hmm... good point. Though if we match this up wit
+ };
+
+ enum ErrorType {
+ MANIFEST,
+ RUNTIME
+ };
+
+ enum ErrorSeverity {
+ LOG,
+ WARNING,
+ ERROR
+ };
+
+ enum ExtensionState {
+ ENABLED,
+ DISABLED,
+ TERMINATED
+ };
+
+ dictionary StackFrame {
+ long lineNumber;
+ long columnNumber;
+ DOMString source;
+ DOMString function;
not at google - send to devlin 2015/03/09 18:44:01 You might have a problem with calling something "f
Devlin 2015/03/09 19:28:20 There's no problem having a "function" property on
+ };
+
+ dictionary ManifestError {
+ ErrorType type;
+ DOMString extensionId;
+ boolean fromIncognito;
+ DOMString source;
+ DOMString message;
+ DOMString manifestKey;
+ DOMString? manifestSpecific;
+ };
+
+ dictionary RuntimeError {
not at google - send to devlin 2015/03/09 18:44:01 This shares a lot with ManifestError, you could ha
Devlin 2015/03/09 19:28:20 But (our) IDL doesn't have inheritance, and, of co
not at google - send to devlin 2015/03/09 21:11:39 I mean: dictionary ErrorBase { ErrorType type;
+ ErrorType type;
+ DOMString extension_id;
+ boolean fromIncognito;
+ DOMString source;
+ DOMString message;
+ 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
Devlin 2015/03/07 03:21:03 The chickenscratch comments map to the names in ex
+ DOMString? blacklistText;
+ DOMString[] dependentExtensions;
+ DOMString description;
+ DisableReasons disableReasons; //suspicious, corrupt, updaterequired
not at google - send to devlin 2015/03/09 18:44:01 space after //
Devlin 2015/03/09 19:28:20 Chickenscratch will be removed. :P Only left it i
+ RunStateValue errorCollection; // errorCollectionEd, wantsErrorCollection;
+ RunStateValue fileAccess; // allowFileAccess, wantsFileAccess
+ HomePage homePage; // homepageProvided && homepageUrl
+ DOMString iconUrl; // icon
+ DOMString id;
+ RunStateValue incognitoAccess; // enabled/can be enabled incognito
+ boolean installedByCustodian;
+ DOMString[] installWarnings;
+ DOMString? launchUrl;
+ Location location; // is_unpacked, is from store, allow reload
not at google - send to devlin 2015/03/09 18:44:01 is from store --> is_from_store --> etc.
Devlin 2015/03/09 19:28:20 Ditto.
+ DOMString? locationText;
+ ManifestError[] manifestErrors;
+ boolean mustRemainInstalled; // recommendedInstall
+ DOMString name;
+ boolean offlineEnabled;
+ OptionsPage? optionsPage;
+ DOMString? path;
+ DOMString? policyText;
+ DOMString? prettifiedPath;
+ RunStateValue 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 +191,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 +335,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 +352,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);
« no previous file with comments | « chrome/chrome_browser_extensions.gypi ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698