Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Side by Side Diff: chrome/common/extensions/docs/templates/intros/permissions.html

Issue 12223068: Fix some typos, broken links and other issues in extension docs (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <p id="classSummary"> 1 <p id="classSummary">
2 Use the <code>chrome.permissions</code> module 2 Use the <code>chrome.permissions</code> module
3 to implement optional permissions. 3 to implement optional permissions.
4 As of Chrome 16, you can request optional permissions during your 4 As of Chrome 16, you can request optional permissions during your
5 extension's regular application flow rather than at install time, 5 extension's regular application flow rather than at install time,
6 so users understand why the permissions are needed 6 so users understand why the permissions are needed
7 and use only those that are necessary. 7 and use only those that are necessary.
8 </p> 8 </p>
9 9
10 <p> 10 <p>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 present. 51 present.
52 </li> 52 </li>
53 </ul> 53 </ul>
54 </p> 54 </p>
55 55
56 56
57 <h3 id="manifest"> Step 2: Declare optional permissions in the manifest </h3> 57 <h3 id="manifest"> Step 2: Declare optional permissions in the manifest </h3>
58 <p> 58 <p>
59 Declare optional permissions in your <a href="manifest.html">extension 59 Declare optional permissions in your <a href="manifest.html">extension
60 manifest</a> with the <code>optional_permissions</code> key, using the 60 manifest</a> with the <code>optional_permissions</code> key, using the
61 same format as the <a href="manifest.html#permissions">permissions</a> 61 same format as the <a href="declare_permissions.html">permissions</a>
62 field: 62 field:
63 63
64 <pre>{ 64 <pre>{
65 "name": "My extension", 65 "name": "My extension",
66 ... 66 ...
67 <b>"optional_permissions": [ "tabs", "http://www.google.com/" ],</b> 67 <b>"optional_permissions": [ "tabs", "http://www.google.com/" ],</b>
68 ... 68 ...
69 }</pre> 69 }</pre>
70 </p> 70 </p>
71 71
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 permissions: ['tabs'], 163 permissions: ['tabs'],
164 origins: ['http://www.google.com/'] 164 origins: ['http://www.google.com/']
165 }, function(removed) { 165 }, function(removed) {
166 if (removed) { 166 if (removed) {
167 // The permissions have been removed. 167 // The permissions have been removed.
168 } else { 168 } else {
169 // The permissions have not been removed (e.g., you tried to remove 169 // The permissions have not been removed (e.g., you tried to remove
170 // required permissions). 170 // required permissions).
171 } 171 }
172 }); 172 });
173 </pre> 173 </pre>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698