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

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

Issue 10834130: Extensions Docs Server: Doc conversion script - SVN (Closed) Base URL: https://src.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
OLDNEW
1 <div id="pageData-name" class="pageData">Optional Permissions</div>
2
3 <!-- BEGIN AUTHORED CONTENT -->
4 <p id="classSummary"> 1 <p id="classSummary">
5 Use the <code>chrome.permissions</code> module to implement 2 Use the <code>chrome.permissions</code> module to implement
6 optional permissions. You can request optional permissions during your 3 optional permissions. You can request optional permissions during your
7 extension's regular application flow rather than at install time, so users 4 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 5 understand why the permissions are needed and use only those that are
9 necessary. 6 necessary.
10 </p> 7 </p>
11 8
12 <p> 9 <p>
13 For general information about permissions and details about each permission, 10 For general information about permissions and details about each permission,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 </p> 124 </p>
128 125
129 <p> 126 <p>
130 Chrome prompts the user if adding the permissions results in different 127 Chrome prompts the user if adding the permissions results in different
131 <a href="permission_warnings.html">warning messages</a> than the user has 128 <a href="permission_warnings.html">warning messages</a> than the user has
132 already seen and accepted. For example, the previous code might result in 129 already seen and accepted. For example, the previous code might result in
133 a prompt like this: 130 a prompt like this:
134 </p> 131 </p>
135 132
136 <p style="text-align: center"> 133 <p style="text-align: center">
137 <img src="../images/perms-optional.png" 134 <img src="{{static}}/images/perms-optional.png"
138 alt="example permission confirmation prompt" 135 alt="example permission confirmation prompt"
139 width="416" height="234"> 136 width="416" height="234">
140 </p> 137 </p>
141 138
142 <h3 id="contains"> Step 4: Check the extension's current permissions </h3> 139 <h3 id="contains"> Step 4: Check the extension's current permissions </h3>
143 <p> 140 <p>
144 To check whether your extension has a specific permission or set of 141 To check whether your extension has a specific permission or set of
145 permissions, use <code>permission.contains()</code>: 142 permissions, use <code>permission.contains()</code>:
146 </p> 143 </p>
147 144
(...skipping 23 matching lines...) Expand all
171 permissions: ['tabs'], 168 permissions: ['tabs'],
172 origins: ['http://www.google.com/'] 169 origins: ['http://www.google.com/']
173 }, function(removed) { 170 }, function(removed) {
174 if (removed) { 171 if (removed) {
175 // The permissions have been removed. 172 // The permissions have been removed.
176 } else { 173 } else {
177 // The permissions have not been removed (e.g., you tried to remove 174 // The permissions have not been removed (e.g., you tried to remove
178 // required permissions). 175 // required permissions).
179 } 176 }
180 }); 177 });
181 </pre> 178 </pre>
182
183 <!-- END AUTHORED CONTENT -->
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698