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

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: 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..ad23e552cc23296e273530383c3481bd83b498c2
--- /dev/null
+++ b/chrome/common/extensions/docs/server2/templates/articles/activeTab.html
@@ -0,0 +1,25 @@
+<h1>The activeTab permission</h1>
+
+<p>
+The <code>activeTab</code> permission is for extensions that perform an action on a tab in response to the user. For example, an extension with a browser action that changes the formatting of the current page when clicked, or has a context menu which acts on the word that was clicked on.
+</p>
+
+<p>
+Traditionally such extensions would need to request both the <code>&lt;all_urls&gt;</code> permission and the <code>tabs</code> permission, requiring a scary install warning. With the <code>activeTab</code> permission, none of that is necessary.
+</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 following qualify as invocations:
+<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, or
+ <li>executing a command configured for an extension.
+</ul>
+</p>

Powered by Google App Engine
This is Rietveld 408576698