summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorkathyw@google.com <kathyw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-23 17:44:29 +0000
committerkathyw@google.com <kathyw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-23 17:44:29 +0000
commite9d71884e97fd3484f2aad0b6f7562e3f86a1616 (patch)
treee8482d9cd6185e67c9f0c36ac8225526d62f892c /chrome/common
parentdb2fb782473f73581430e16df9b1bd8b15e8e85c (diff)
downloadchromium_src-e9d71884e97fd3484f2aad0b6f7562e3f86a1616.zip
chromium_src-e9d71884e97fd3484f2aad0b6f7562e3f86a1616.tar.gz
chromium_src-e9d71884e97fd3484f2aad0b6f7562e3f86a1616.tar.bz2
Clarified the manifest example code. Added "version" description.
TEST=none BUG=none Review URL: http://codereview.chromium.org/326008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/docs/manifest.html111
-rw-r--r--chrome/common/extensions/docs/static/manifest.html104
2 files changed, 154 insertions, 61 deletions
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index 2bb46a2..3f980d1 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -173,13 +173,13 @@
<li jsinstance="0">
<a href="#description">description</a>
</li><li jsinstance="1">
- <a href="#icon">icon</a>
- </li><li jsinstance="2">
<a href="#icons">icons</a>
- </li><li jsinstance="3">
+ </li><li jsinstance="2">
<a href="#name">name</a>
- </li><li jsinstance="*4">
+ </li><li jsinstance="3">
<a href="#permissions">permissions</a>
+ </li><li jsinstance="*4">
+ <a href="#version">version</a>
</li>
</ol>
</li>
@@ -247,23 +247,27 @@ are <b>name</b> and <b>version</b>.
</p>
<pre>{
- <b>"<a href="#name">name</a>"</b>: "<em>My Extension</em>",
- <b>"<a href="autoupdate.html">version</a>"</b>: "<em>versionString</em>",
+ <em>// Required</em>
+ "<a href="#name">name</a>": "<em>My Extension</em>",
+ "<a href="#version">version</a>": "<em>versionString</em>",
+ <em>// Recommended</em>
"<a href="#description">description</a>": "<em>A plain text description</em>",
"<a href="#icons">icons</a>": { ... },
- "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
- "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html",
+ <em>// Pick one (or none)</em>
"<a href="browserAction.html">brower_action</a>": {...},
- "<a href="ntp.html">chrome_url_overrides</a>": {...},
- "<a href="content_scripts.html">content_scripts</a>": [...],
"<a href="pageAction.html">page_action</a>": {...},
- "<a href="#permissions">permissions</a>": [...],
- "<a href="npapi.html">plugins</a>": [...],
"<a href="themes.html">theme</a>": {...},
- "<a href="toolstrip.html">toolstrips</a>": [...],
+
+ <em>// Add any of these that you need</em>
+ "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html",
+ "<a href="ntp.html">chrome_url_overrides</a>": {...},
+ "<a href="content_scripts.html">content_scripts</a>": [...],
"<a href="options.html">options_page</a>": "<em>aFile</em>.html",
+ "<a href="#permissions">permissions</a>": [...],
+ "<a href="npapi.html">plugins</a>": [...]
+ "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
}
</pre>
@@ -288,17 +292,6 @@ the browser's extension management UI
and the extension gallery.
</p>
-<h3 id="icon">icon</h3>
-
-<p>
-An icon that represents the extension.
-As a rule, you should use the <b>icons</b> field instead,
-so that you can specify icons in multiple sizes.
-Here's an example of using this field:
-</p>
-
-<pre>"icon": "icon.png",
-</pre>
<h3 id="icons">icons</h3>
@@ -331,19 +324,26 @@ and the extension gallery.
<h3 id="permissions">permissions</h3>
<p>
-The capabilities the extension might use.
-A permission can be either one of a list of known strings
-(currently, either "tabs" or "bookmarks")
-or a match pattern,
-which gives access to one or more hosts.
-The idea is not to restrict what you can do,
-but to give advanced users an indication of what your extension
-will be able to do.
+An array of permissions that the extension might use.
+Each permission can be either one of a list of known strings
+(such as "tabs" or "bookmarks")
+or a match pattern
+that gives access to one or more hosts.
+These permissions are displayed to users before installation.
Permissions might also help to limit damage
if your extension is attacked.
</p>
<p>
+If an API requires you to declare a permission in the manifest,
+then its documentation tells you how to do so.
+For example,
+the <a href="tabs.html">Tabs</a> page
+shows you how to
+declare the "tabs" permission.
+</p>
+
+<p>
Here's an example of the permissions part of a manifest file:
</p>
@@ -363,6 +363,53 @@ For more information, see
<a href="bookmarks.html">Bookmarks</a>.
</p>
+<h3 id="version">version</h3>
+
+<p>
+One to four dot-separated integers
+identifying the version of this extension.
+Examples:
+</p>
+
+<ul>
+ <li> <code>"version": "1"</code> </li>
+ <li> <code>"version": "1.0"</code> </li>
+ <li> <code>"version": "2.10.2"</code> </li>
+ <li> <code>"version": "3.1.2.4567"</code> </li>
+</ul>
+
+<p>
+The autoupdate system compares versions
+to determine whether an installed extension
+needs to be updated.
+If the published extension has a newer version string
+than the installed extension,
+then the extension is automatically updated.
+</p>
+
+<p>
+The comparison starts with the leftmost integers.
+If those integers are equal,
+the integers to the right are compared,
+and so on.
+For example, 1.2.0 is a newer version than 1.1.9.99999.
+</p>
+
+<p>
+A missing integer is equal to zero.
+For example, 1.1.9.99999 is newer than 1.1.
+</p>
+
+<p>
+For more information, see
+<a href="autoupdate.html">Autoupdating</a>.
+</p>
+
+<p class="comment">
+[PENDING: Once the gallery is published, point to it
+and make a big deal of the fact that autoupdating is free
+if you use the gallery.]
+</p>
</div>
<!-- API PAGE -->
diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html
index dfb5619..d24591d 100644
--- a/chrome/common/extensions/docs/static/manifest.html
+++ b/chrome/common/extensions/docs/static/manifest.html
@@ -19,23 +19,27 @@ are <b>name</b> and <b>version</b>.
<pre>
{
- <b>"<a href="#name">name</a>"</b>: "<em>My Extension</em>",
- <b>"<a href="autoupdate.html">version</a>"</b>: "<em>versionString</em>",
+ <em>// Required</em>
+ "<a href="#name">name</a>": "<em>My Extension</em>",
+ "<a href="#version">version</a>": "<em>versionString</em>",
+ <em>// Recommended</em>
"<a href="#description">description</a>": "<em>A plain text description</em>",
"<a href="#icons">icons</a>": { ... },
- "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
- "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html",
+ <em>// Pick one (or none)</em>
"<a href="browserAction.html">brower_action</a>": {...},
- "<a href="ntp.html">chrome_url_overrides</a>": {...},
- "<a href="content_scripts.html">content_scripts</a>": [...],
"<a href="pageAction.html">page_action</a>": {...},
- "<a href="#permissions">permissions</a>": [...],
- "<a href="npapi.html">plugins</a>": [...],
"<a href="themes.html">theme</a>": {...},
- "<a href="toolstrip.html">toolstrips</a>": [...],
+
+ <em>// Add any of these that you need</em>
+ "<a href="background_pages.html">background_page</a>": "<em>aFile</em>.html",
+ "<a href="ntp.html">chrome_url_overrides</a>": {...},
+ "<a href="content_scripts.html">content_scripts</a>": [...],
"<a href="options.html">options_page</a>": "<em>aFile</em>.html",
+ "<a href="#permissions">permissions</a>": [...],
+ "<a href="npapi.html">plugins</a>": [...]
+ "<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
}
</pre>
@@ -60,18 +64,6 @@ the browser's extension management UI
and the extension gallery.
</p>
-<h3 id="icon">icon</h3>
-
-<p>
-An icon that represents the extension.
-As a rule, you should use the <b>icons</b> field instead,
-so that you can specify icons in multiple sizes.
-Here's an example of using this field:
-</p>
-
-<pre>
-"icon": "icon.png",
-</pre>
<h3 id="icons">icons</h3>
@@ -105,19 +97,26 @@ and the extension gallery.
<h3 id="permissions">permissions</h3>
<p>
-The capabilities the extension might use.
-A permission can be either one of a list of known strings
-(currently, either "tabs" or "bookmarks")
-or a match pattern,
-which gives access to one or more hosts.
-The idea is not to restrict what you can do,
-but to give advanced users an indication of what your extension
-will be able to do.
+An array of permissions that the extension might use.
+Each permission can be either one of a list of known strings
+(such as "tabs" or "bookmarks")
+or a match pattern
+that gives access to one or more hosts.
+These permissions are displayed to users before installation.
Permissions might also help to limit damage
if your extension is attacked.
</p>
<p>
+If an API requires you to declare a permission in the manifest,
+then its documentation tells you how to do so.
+For example,
+the <a href="tabs.html">Tabs</a> page
+shows you how to
+declare the "tabs" permission.
+</p>
+
+<p>
Here's an example of the permissions part of a manifest file:
</p>
@@ -138,3 +137,50 @@ For more information, see
<a href="bookmarks.html">Bookmarks</a>.
</p>
+<h3 id="version">version</h3>
+
+<p>
+One to four dot-separated integers
+identifying the version of this extension.
+Examples:
+</p>
+
+<ul>
+ <li> <code>"version": "1"</code> </li>
+ <li> <code>"version": "1.0"</code> </li>
+ <li> <code>"version": "2.10.2"</code> </li>
+ <li> <code>"version": "3.1.2.4567"</code> </li>
+</ul>
+
+<p>
+The autoupdate system compares versions
+to determine whether an installed extension
+needs to be updated.
+If the published extension has a newer version string
+than the installed extension,
+then the extension is automatically updated.
+</p>
+
+<p>
+The comparison starts with the leftmost integers.
+If those integers are equal,
+the integers to the right are compared,
+and so on.
+For example, 1.2.0 is a newer version than 1.1.9.99999.
+</p>
+
+<p>
+A missing integer is equal to zero.
+For example, 1.1.9.99999 is newer than 1.1.
+</p>
+
+<p>
+For more information, see
+<a href="autoupdate.html">Autoupdating</a>.
+</p>
+
+<p class="comment">
+[PENDING: Once the gallery is published, point to it
+and make a big deal of the fact that autoupdating is free
+if you use the gallery.]
+</p>