OLD | NEW |
1 <h1>Declare Permissions</h1> | 1 <h1>Declare Permissions</h1> |
2 | 2 |
3 <p> | 3 <p> |
4 To use most chrome.* APIs, | 4 To use most chrome.* APIs, |
5 your extension or app must declare its intent in the | 5 your extension or app must declare its intent in the |
6 "permissions" field of the | 6 "permissions" field of the |
7 <a href="manifest.html">manifest</a>. | 7 <a href="manifest">manifest</a>. |
8 Each permission can be either one of a list of known strings | 8 Each permission can be either one of a list of known strings |
9 (such as "geolocation") | 9 (such as "geolocation") |
10 or a <a href="match_patterns.html">match pattern</a> | 10 or a <a href="match_patterns">match pattern</a> |
11 that gives access to one or more hosts. | 11 that gives access to one or more hosts. |
12 Permissions help to limit damage | 12 Permissions help to limit damage |
13 if your extension or app is compromised by malware. | 13 if your extension or app is compromised by malware. |
14 Some permissions are also displayed to users before installation, | 14 Some permissions are also displayed to users before installation, |
15 as detailed in | 15 as detailed in |
16 <a href="permission_warnings.html">Permission Warnings</a>. | 16 <a href="permission_warnings">Permission Warnings</a>. |
17 </p> | 17 </p> |
18 | 18 |
19 <p> | 19 <p> |
20 If an API requires you to declare a permission in the manifest, | 20 If an API requires you to declare a permission in the manifest, |
21 then its documentation tells you how to do so. | 21 then its documentation tells you how to do so. |
22 For example, | 22 For example, |
23 the <a href="storage.html">Storage</a> page | 23 the <a href="storage">Storage</a> page |
24 shows you how to | 24 shows you how to |
25 declare the "storage" permission. | 25 declare the "storage" permission. |
26 </p> | 26 </p> |
27 | 27 |
28 <p id="manifest"> | 28 <p id="manifest"> |
29 Here's an example of the permissions part of a manifest file: | 29 Here's an example of the permissions part of a manifest file: |
30 </p> | 30 </p> |
31 | 31 |
32 <pre data-filename="manifest.json"> | 32 <pre data-filename="manifest.json"> |
33 {{^is_apps}} | 33 {{^is_apps}} |
(...skipping 28 matching lines...) Expand all Loading... |
62 <tr id="{{p.anchor}}"> | 62 <tr id="{{p.anchor}}"> |
63 <td> | 63 <td> |
64 <code>"{{p.name}}"</code> | 64 <code>"{{p.name}}"</code> |
65 </td> | 65 </td> |
66 <td> | 66 <td> |
67 {{+p.description platform:platform name:p.name/}} | 67 {{+p.description platform:platform name:p.name/}} |
68 </td> | 68 </td> |
69 </tr> | 69 </tr> |
70 {{/permissions}} | 70 {{/permissions}} |
71 </table> | 71 </table> |
OLD | NEW |