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

Unified Diff: chrome/common/extensions/docs/server2/templates/articles/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, 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/templates/articles/activeTab.html
diff --git a/chrome/common/extensions/docs/server2/templates/articles/activeTab.html b/chrome/common/extensions/docs/server2/templates/articles/activeTab.html
new file mode 100644
index 0000000000000000000000000000000000000000..b2c430cb3b40b4520ec1fa0c405bf96acd98058e
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/templates/articles/activeTab.html
@@ -0,0 +1,30 @@
+<h1>The activeTab permission</h1>
mkearney1 2012/09/12 17:02:37 General comment: I like the heading style in the o
+
+<p>
+The <code>activeTab</code> permission allows extensions to access the active tab in response to user gestures like clicking an <a href="browserAction.html">extension 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
+</p>
+
+<p>
+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 action and context menu item. The extension doesn't need to run automatically on all pages, it only needs to run when one of its UI surfaces is acted upon.
+</p>
+
+<p>
+Without <code>activeTab</code> the extension would need to request both the <code>&lt;all_urls&gt;</code> and <code>tabs</code> permissions, showing a scary warning 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
+</p>
+
+</p>
+Formally, the <code>activeTab</code> permission allows an extension to use <a href="tabs.html#method-executeScript">tabs.executeScript</a> and <a href="tabs.html#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 until the tab is navigated.
+</p>
+
+<p>
+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:
+<ul>
+ <li>clicking on an extension’s browser action,
+ <li>clicking on an extension’s page action,
+ <li>clicking on an extension’s script badge,
+ <li>accepting a suggestion from an extension’s omnibox,
+ <li>invoking an action from an extension’s context menu, and
+ <li>executing a command configured for an extension.
+</ul>
mkearney1 2012/09/12 17:02:37 I'm a little bit curious about the last item here
+But this list will grow over time as more types of extension UIs are added.
+</p>

Powered by Google App Engine
This is Rietveld 408576698