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

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

Issue 8770051: Add a few permissions to the optional permission whitelist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years 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
« no previous file with comments | « chrome/common/extensions/docs/permissions.html ('k') | chrome/common/extensions/docs/tabs.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <div id="pageData-name" class="pageData">Optional Permissions</div> 1 <div id="pageData-name" class="pageData">Optional Permissions</div>
2 2
3 <!-- BEGIN AUTHORED CONTENT --> 3 <!-- BEGIN AUTHORED CONTENT -->
4 <p id="classSummary"> 4 <p id="classSummary">
5 Use the <code>chrome.permissions</code> module to implement 5 Use the <code>chrome.permissions</code> module to implement
6 optional permissions. You can request optional permissions during your 6 optional permissions. You can request optional permissions during your
7 extension's regular application flow rather than at install time, so users 7 extension's regular application flow rather than at install time, so users
8 understand why the permissions are needed and use only those that are 8 understand why the permissions are needed and use only those that are
9 necessary. 9 necessary.
10 </p> 10 </p>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 ... 69 ...
70 <b>"optional_permissions": [ "tabs", "http://www.google.com/" ],</b> 70 <b>"optional_permissions": [ "tabs", "http://www.google.com/" ],</b>
71 ... 71 ...
72 }</pre> 72 }</pre>
73 </p> 73 </p>
74 74
75 <p> 75 <p>
76 You can specify any of the following as optional permissions: 76 You can specify any of the following as optional permissions:
77 <ul> 77 <ul>
78 <li><i>host permissions</i></li> 78 <li><i>host permissions</i></li>
79 <li>appNotifications</li>
79 <li>background</li> 80 <li>background</li>
80 <li>bookmarks</li> 81 <li>bookmarks</li>
81 <li>clipboardRead</li> 82 <li>clipboardRead</li>
82 <li>clipboardWrite</li> 83 <li>clipboardWrite</li>
84 <li>contentSettings</li>
83 <li>contextMenus</li> 85 <li>contextMenus</li>
84 <li>cookies</li> 86 <li>cookies</li>
85 <li>debugger</li> 87 <li>debugger</li>
86 <li>history</li> 88 <li>history</li>
87 <li>idle</li> 89 <li>idle</li>
88 <li>management</li> 90 <li>management</li>
89 <li>notifications</li> 91 <li>notifications</li>
92 <li>pageCapture</li>
90 <li>tabs</li> 93 <li>tabs</li>
94 <li>webNavigation</li>
95 <li>webRequest</li>
96 <li>webRequestBlocking</li>
91 </ul> 97 </ul>
92 </p> 98 </p>
93 99
94 <p class="note"> 100 <p class="note">
95 <b>Version note:</b> This list is correct as of Chrome 16. 101 <b>Version note:</b> This list is correct as of Chrome 17.
96 More optional permissions might be allowed in future releases. 102 More optional permissions might be allowed in future releases.
97 </p> 103 </p>
98 104
99 <h3 id="request"> Step 3: Request optional permissions </h3> 105 <h3 id="request"> Step 3: Request optional permissions </h3>
100 <p> 106 <p>
101 Request the permissions from within a user gesture using 107 Request the permissions from within a user gesture using
102 <code>permissions.request()</code>: 108 <code>permissions.request()</code>:
103 <pre> 109 <pre>
104 document.querySelector('#my-button').addEventListener('click', function(event) { 110 document.querySelector('#my-button').addEventListener('click', function(event) {
105 // Permissions must be requested from inside a user gesture, like a button's 111 // Permissions must be requested from inside a user gesture, like a button's
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (removed) { 173 if (removed) {
168 // The permissions have been removed. 174 // The permissions have been removed.
169 } else { 175 } else {
170 // The permissions have not been removed (e.g., you tried to remove 176 // The permissions have not been removed (e.g., you tried to remove
171 // required permissions). 177 // required permissions).
172 } 178 }
173 }); 179 });
174 </pre> 180 </pre>
175 181
176 <!-- END AUTHORED CONTENT --> 182 <!-- END AUTHORED CONTENT -->
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/permissions.html ('k') | chrome/common/extensions/docs/tabs.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698