| <h1>Declare Permissions</h1> |
| |
| <p> |
| To use most chrome.* APIs, |
| your extension or app must declare its intent in the |
| "permissions" field of the |
| <a href="manifest.html">manifest</a>. |
| Each permission can be either one of a list of known strings |
| (such as "geolocation") |
| or a <a href="match_patterns.html">match pattern</a> |
| that gives access to one or more hosts. |
| Permissions help to limit damage |
| if your extension or app is compromised by malware. |
| Some permissions are also displayed to users before installation, |
| as detailed in |
| <a href="permission_warnings.html">Permission Warnings</a>. |
| </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="storage.html">Storage</a> page |
| shows you how to |
| declare the "storage" permission. |
| </p> |
| |
| <p id="manifest"> |
| Here's an example of the permissions part of a manifest file: |
| </p> |
| |
| {{^is_apps}} |
| <pre> |
| "permissions": [ |
| "tabs", |
| "bookmarks", |
| "http://www.blogger.com/", |
| "http://*.google.com/", |
| "unlimitedStorage" |
| ], |
| </pre> |
| {{/is_apps}} |
| |
| {{?is_apps}} |
| <pre> |
| "permissions": [ |
| "serial", |
| "storage", |
| "videoCapture" |
| ], |
| </pre> |
| {{/is_apps}} |
| |
| <p> |
| The following table lists the currently available permissions: |
| </p> |
| |
| <table> |
| <tr> |
| <th>Permission</th> |
| <th>Description</th> |
| </tr> |
| {{#permissions}} |
| <tr id="{{anchor}}"> |
| <td> |
| <code>"{{name}}"</code> |
| </td> |
| <td> |
| {{+description platform:platform name:name}} |
| </td> |
| </tr> |
| {{/permissions}} |
| </table> |