summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authortessamac@google.com <tessamac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 22:05:23 +0000
committertessamac@google.com <tessamac@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 22:05:23 +0000
commite78543c690ebf455f1161f2640d44828731f5089 (patch)
tree50b4a58299171fba325a4b385a3afbf20f630552 /chrome/common
parent368ef4c1222e7928726b4d1865969dbe0053ac0f (diff)
downloadchromium_src-e78543c690ebf455f1161f2640d44828731f5089.zip
chromium_src-e78543c690ebf455f1161f2640d44828731f5089.tar.gz
chromium_src-e78543c690ebf455f1161f2640d44828731f5089.tar.bz2
Add api method to get an installed extension by ID.
BUG=60982 TEST=browser_tests Review URL: http://codereview.chromium.org/4354001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/api/extension_api.json22
-rw-r--r--chrome/common/extensions/docs/management.html239
-rw-r--r--chrome/common/extensions/docs/samples.json3
3 files changed, 263 insertions, 1 deletions
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index 3fa0606..45d9409 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -4105,6 +4105,28 @@
]
},
{
+ "name": "get",
+ "description": "Return information about the installed extension with the given ID.",
+ "parameters": [
+ {
+ "name": "id",
+ "type": "string",
+ "description": "The ID from an item of $ref:ExtensionInfo."
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": "true",
+ "parameters": [
+ {
+ "name": "result",
+ "$ref": "ExtensionInfo"
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "setEnabled",
"description": "Enable or disable an app or extension.",
"parameters": [
diff --git a/chrome/common/extensions/docs/management.html b/chrome/common/extensions/docs/management.html
index 1f1b0c6..2792019 100644
--- a/chrome/common/extensions/docs/management.html
+++ b/chrome/common/extensions/docs/management.html
@@ -261,6 +261,8 @@
<a href="#methods">Methods</a>
<ol>
<li>
+ <a href="#method-get">get</a>
+ </li><li>
<a href="#method-getAll">getAll</a>
</li><li>
<a href="#method-launchApp">launchApp</a>
@@ -362,6 +364,243 @@ For example:</p>
<!-- iterates over all functions -->
<div class="apiItem">
+ <a name="method-get"></a> <!-- method-anchor -->
+ <h4>get</h4>
+
+ <div class="summary"><span style="display: none; ">void</span>
+ <!-- Note: intentionally longer 80 columns -->
+ <span>chrome.management.get</span>(<span class="null"><span style="display: none; ">, </span><span>string</span>
+ <var><span>id</span></var></span><span class="optional"><span>, </span><span>function</span>
+ <var><span>callback</span></var></span>)</div>
+
+ <div class="description">
+ <p class="todo" style="display: none; ">Undocumented.</p>
+ <p>Return information about the installed extension with the given ID.</p>
+
+ <!-- PARAMETERS -->
+ <h4>Parameters</h4>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>id</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>string</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo" style="display: none; ">
+ Undocumented.
+ </dd>
+ <dd>The ID from an item of <a href="management.html#type-ExtensionInfo">ExtensionInfo</a>.</dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div><div>
+ <div>
+ <dt>
+ <var>callback</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span style="display: none; ">
+ <a> Type</a>
+ </span>
+ <span>
+ <span style="display: none; ">
+ array of <span><span></span></span>
+ </span>
+ <span>function</span>
+ <span style="display: none; "></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+
+ <!-- RETURNS -->
+ <h4 style="display: none; ">Returns</h4>
+ <dl>
+ <div style="display: none; ">
+ <div>
+ </div>
+ </div>
+ </dl>
+
+ <!-- CALLBACK -->
+ <div>
+ <div>
+ <h4>Callback function</h4>
+ <p style="display: none; ">
+ The callback <em>parameter</em> should specify a function
+ that looks like this:
+ </p>
+ <p>
+ If you specify the <em>callback</em> parameter, it should
+ specify a function that looks like this:
+ </p>
+
+ <!-- Note: intentionally longer 80 columns -->
+ <pre>function(<span>ExtensionInfo result</span>) <span class="subdued">{...}</span>;</pre>
+ <dl>
+ <div>
+ <div>
+ <dt>
+ <var>result</var>
+ <em>
+
+ <!-- TYPE -->
+ <div style="display:inline">
+ (
+ <span class="optional" style="display: none; ">optional</span>
+ <span class="enum" style="display: none; ">enumerated</span>
+ <span id="typeTemplate">
+ <span>
+ <a href="management.html#type-ExtensionInfo">ExtensionInfo</a>
+ </span>
+ <span style="display: none; ">
+ <span>
+ array of <span><span></span></span>
+ </span>
+ <span>paramType</span>
+ <span></span>
+ </span>
+ </span>
+ )
+ </div>
+
+ </em>
+ </dt>
+ <dd class="todo">
+ Undocumented.
+ </dd>
+ <dd style="display: none; ">
+ Description of this parameter from the json schema.
+ </dd>
+ <dd style="display: none; ">
+ This parameter was added in version
+ <b><span></span></b>.
+ You must omit this parameter in earlier versions,
+ and you may omit it in any version. If you require this
+ parameter, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </dd>
+
+ <!-- OBJECT PROPERTIES -->
+ <dd style="display: none; ">
+ <dl>
+ <div>
+ <div>
+ </div>
+ </div>
+ </dl>
+ </dd>
+
+ <!-- FUNCTION PARAMETERS -->
+ <dd style="display: none; ">
+ <div></div>
+ </dd>
+
+ </div>
+ </div>
+ </dl>
+ </div>
+ </div>
+
+ <!-- MIN_VERSION -->
+ <p style="display: none; ">
+ This function was added in version <b><span></span></b>.
+ If you require this function, the manifest key
+ <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
+ can ensure that your extension won't be run in an earlier browser version.
+ </p>
+ </div> <!-- /description -->
+
+ </div><div class="apiItem">
<a name="method-getAll"></a> <!-- method-anchor -->
<h4>getAll</h4>
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index b0b92a9..bc67080 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -51,6 +51,7 @@
"chrome.experimental.clipboard.executeCopy": "experimental.clipboard.html#method-executeCopy",
"chrome.bookmarks.move": "bookmarks.html#method-move",
"chrome.experimental.webRequest.onBeforeRedirect": "experimental.webRequest.html#event-onBeforeRedirect",
+ "chrome.management.get": "management.html#method-get",
"chrome.tabs.getCurrent": "tabs.html#method-getCurrent",
"chrome.experimental.sidebar.getState": "experimental.sidebar.html#method-getState",
"chrome.management.launchApp": "management.html#method-launchApp",
@@ -1450,4 +1451,4 @@
"name": "Typed URL History"
}
]
-} \ No newline at end of file
+}