Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <h1>The activeTab permission</h1> | |
|
mkearney1
2012/09/12 17:02:37
General comment: I like the heading style in the o
| |
| 2 | |
| 3 <p> | |
| 4 The <code>activeTab</code> permission allows extensions to access the active tab in response to user gestures like clicking an <a href="browserAction.html">exte nsion button</a> or <a href="contextMenus.html">context menu item</a>. | |
|
mkearney1
2012/09/12 17:02:37
I kind of like parts of the original active tab in
| |
| 5 </p> | |
| 6 | |
| 7 <p> | |
| 8 Many extensions only need access to a page in response to a user gesture on the extension. For example, consider a web clipping extension that has a browser act ion and context menu item. The extension doesn't need to run automatically on al l pages, it only needs to run when one of its UI surfaces is acted upon. | |
| 9 </p> | |
| 10 | |
| 11 <p> | |
| 12 Without <code>activeTab</code> the extension would need to request both the <cod e><all_urls></code> and <code>tabs</code> permissions, showing a scary war ning on installation. With <code>activeTab</code> none of that will be necessary . | |
|
mkearney1
2012/09/12 17:02:37
Does a warning get displayed to the user at any ti
mkearney1
2012/09/12 17:02:37
Nit, commas after 'Without activeTab' and 'With ac
| |
| 13 </p> | |
| 14 | |
| 15 </p> | |
| 16 Formally, the <code>activeTab</code> permission allows an extension to use <a hr ef="tabs.html#method-executeScript">tabs.executeScript</a> and <a href="tabs.htm l#method-insertCSS">tabs.insertCSS</a> on any tab the extension has been invoked on, including any frames with the same security origin. The permission lasts un til the tab is navigated. | |
| 17 </p> | |
| 18 | |
| 19 <p> | |
| 20 The <code>activeTab</code> permission is activated whenever a piece of extension UI is acted upon by a user. At the time of writing, examples of such UI include : | |
| 21 <ul> | |
| 22 <li>clicking on an extension’s browser action, | |
| 23 <li>clicking on an extension’s page action, | |
| 24 <li>clicking on an extension’s script badge, | |
| 25 <li>accepting a suggestion from an extension’s omnibox, | |
| 26 <li>invoking an action from an extension’s context menu, and | |
| 27 <li>executing a command configured for an extension. | |
| 28 </ul> | |
|
mkearney1
2012/09/12 17:02:37
I'm a little bit curious about the last item here
| |
| 29 But this list will grow over time as more types of extension UIs are added. | |
| 30 </p> | |
| OLD | NEW |