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

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

Issue 10874057: Document the activeTab extension permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: aa Created 8 years, 3 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
(Empty)
1 <div id="pageData-name" class="pageData">The activeTab permission</div>
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>.
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>&lt;all_urls&gt;</code> and <code>tabs</code> permissions, showing a scary war ning on installation. With <code>activeTab</code> none of that will be necessary .
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>
29 But this list will grow over time as more types of extension UIs are added.
30 </p>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698