| OLD | NEW |
| 1 <p id="classSummary"> | |
| 2 Use the <code>chrome.permissions</code> module | |
| 3 to implement optional permissions. | |
| 4 As of Chrome 16, you can request optional permissions during your | |
| 5 extension's regular application flow rather than at install time, | |
| 6 so users understand why the permissions are needed | |
| 7 and use only those that are necessary. | |
| 8 </p> | |
| 9 | |
| 10 <p> | 1 <p> |
| 11 For general information about permissions and details about each permission, | 2 For general information about permissions and details about each permission, |
| 12 see the <a href="declare_permissions.html">declare permissions</a> documentati
on. | 3 see the <a href="declare_permissions.html">declare permissions</a> documentati
on. |
| 13 </p> | 4 </p> |
| 14 | 5 |
| 15 <h2 id="howto"> Implementing optional permissions </h2> | 6 <h2 id="howto"> Implementing optional permissions </h2> |
| 16 | 7 |
| 17 <h3 id="types"> | 8 <h3 id="types"> |
| 18 Step 1: Decide which permissions are optional and required | 9 Step 1: Decide which permissions are optional and required |
| 19 </h3> | 10 </h3> |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 origins: ['http://www.google.com/'] | 154 origins: ['http://www.google.com/'] |
| 164 }, function(removed) { | 155 }, function(removed) { |
| 165 if (removed) { | 156 if (removed) { |
| 166 // The permissions have been removed. | 157 // The permissions have been removed. |
| 167 } else { | 158 } else { |
| 168 // The permissions have not been removed (e.g., you tried to remove | 159 // The permissions have not been removed (e.g., you tried to remove |
| 169 // required permissions). | 160 // required permissions). |
| 170 } | 161 } |
| 171 }); | 162 }); |
| 172 </pre> | 163 </pre> |
| OLD | NEW |