diff options
author | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 14:49:25 +0000 |
---|---|---|
committer | jstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 14:49:25 +0000 |
commit | fdacba32736298fa743c670d8146c736d41394b1 (patch) | |
tree | c9bbaf4fdb58d9664fc5b148e5575bb2c7e34dfd /chrome/common/extensions/docs/static | |
parent | a690bb054931ce7405f4f2ab96fe5cb35d4c595c (diff) | |
download | chromium_src-fdacba32736298fa743c670d8146c736d41394b1.zip chromium_src-fdacba32736298fa743c670d8146c736d41394b1.tar.gz chromium_src-fdacba32736298fa743c670d8146c736d41394b1.tar.bz2 |
Move extension permissions API out of experimental.
BUG=84507
TEST=*Extension*
Review URL: http://codereview.chromium.org/8277004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/static')
-rw-r--r-- | chrome/common/extensions/docs/static/devguide.html | 5 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/manifest.html | 7 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/permissions.html (renamed from chrome/common/extensions/docs/static/experimental.permissions.html) | 16 |
3 files changed, 22 insertions, 6 deletions
diff --git a/chrome/common/extensions/docs/static/devguide.html b/chrome/common/extensions/docs/static/devguide.html index 79545ff..c2e2c9f 100644 --- a/chrome/common/extensions/docs/static/devguide.html +++ b/chrome/common/extensions/docs/static/devguide.html @@ -108,6 +108,10 @@ applies to packaged apps, as well as extensions. or vice versa</td> </tr> <tr> + <td> <a href="permissions.html">Optional Permissions</a> </td> + <td> Modify your extension's permissions </td> + </tr> + <tr> <td> <a href="npapi.html">NPAPI Plugins</a> </td> <td> Load native binary code </td> </tr> @@ -135,4 +139,3 @@ applies to packaged apps, as well as extensions. <td> Create a <code>.crx</code> file so you can distribute your extension </td> </tr> </table> - diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html index 90d50f0..11327dc 100644 --- a/chrome/common/extensions/docs/static/manifest.html +++ b/chrome/common/extensions/docs/static/manifest.html @@ -382,6 +382,13 @@ shows you how to declare the "tabs" permission. </p> +<p class="note"> +<b>Note:</b> +As of Chrome 16, some permissions can be optional. +For details, see +<a href="permissions.html">Optional Permissions</a>. +</p> + <p> Here's an example of the permissions part of a manifest file for an extension: diff --git a/chrome/common/extensions/docs/static/experimental.permissions.html b/chrome/common/extensions/docs/static/permissions.html index 27a8e3c..54719e1 100644 --- a/chrome/common/extensions/docs/static/experimental.permissions.html +++ b/chrome/common/extensions/docs/static/permissions.html @@ -1,14 +1,20 @@ -<div id="pageData-name" class="pageData">Permissions</div> +<div id="pageData-name" class="pageData">Optional Permissions</div> <!-- BEGIN AUTHORED CONTENT --> <p id="classSummary"> - Use the <code>chrome.experimental.permissions</code> module to implement + Use the <code>chrome.permissions</code> module to implement optional permissions. You can request optional permissions during your extension's regular application flow rather than at install time, so users understand why the permissions are needed and use only those that are necessary. </p> +<p> + For general information about permissions and details about each permission, + see the <a href="manifest.html#permissions">permissions</a> section of the + manifest documentation. +</p> + <h2 id="howto"> Implementing optional permissions </h2> <h3 id="types"> @@ -98,7 +104,7 @@ You can specify any of the following as optional permissions: document.querySelector('#my-button').addEventListener('click', function(event) { // Permissions must be requested from inside a user gesture, like a button's // click handler. - chrome.experimental.permissions.request({ + chrome.permissions.request({ permissions: ['tabs'], origins: ['http://www.google.com/'] }, function(granted) { @@ -133,7 +139,7 @@ document.querySelector('#my-button').addEventListener('click', function(event) { </p> <pre> -chrome.experimental.permissions.contains({ +chrome.permissions.contains({ permissions: ['tabs'], origins: ['http://www.google.com/'] }, function(result) { @@ -154,7 +160,7 @@ chrome.experimental.permissions.contains({ </p> <pre> -chrome.experimental.permissions.remove({ +chrome.permissions.remove({ permissions: ['tabs'], origins: ['http://www.google.com/'] }, function(removed) { |