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

Unified Diff: chrome/common/extensions/docs/manifest.html

Issue 9618033: Updated docs to explain "intents" section in extension manifest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/manifest.html
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index 5acbb5d7dc55ea42548bca48c4c7ee5ccfc5d4f7..fd0157899d185845299c9257cd2f0458137199bb 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -230,6 +230,8 @@
<a href="#manifest_version">manifest_version</a>
</li><li>
<a href="#web_accessible_resources">web_accessible_resources</a>
+ </li><li>
+ <a href="#intents">intents</a>
</li>
</ol>
</li>
@@ -286,6 +288,7 @@ are <b>name</b> and <b>version</b>.
"<a href="#requirements">requirements</a>": {...},
"<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml",
"<a href="#web_accessible_resources">web_accessible_resources</a>": [...]
+ "<a href="#intents">intents</a>": {...}
}
</pre>
<a name="H2-1"></a><h2>Field details</h2>
@@ -894,7 +897,43 @@ by default, but <em>if</em> you do set this property, then it will be treated as
a complete list of all whitelisted resources. Resources not listed will be
blocked.
</p>
-</div>
+<h3 id="intents">intents</h3>
+<p>
+A dictionary that specifies all web intents provided by this extension. Each key in the dictionary specifies the action name that is handled by this extent. The following example specifies two handlers for the action "http://webintents.org/share".
+</p>
+<pre>{
+ "name": "test",
+ "version": "1",
+ "intents": {
+ "http://webintents.org/share": [
+ {
+ "type": ["text/uri-list"],
+ "href": "/services/sharelink.html",
+ "title" : "Sample Link Sharing Intent",
+ "disposition" : "inline"
+ },
+ {
+ "type": ["image/*"],
+ "href": "/services/shareimage.html",
+ "title" : "Sample Image Sharing Intent",
+ "disposition" : "window"
+ }
+ ]
+ }
+}
+</pre>
+<p>
+The value of "type" is an array of mime types that is supported by this handler. "path" indicates the URL of the page that handles the intent. For hosted apps, these URLs must be within the allowed set of URLs. For extensions, all URLs are inside the extension and considered relative to the extension root URL.
+</p>
+<p>
+"title" is the handler's title and is displayed in the intent picker UI if the user initiated the action specific to the handler.
+</p>
+<p>
+"disposition" is either "inline" or "window". Intents with "window" disposition will open a new tab when invoked. Intents with "inline" disposition will be displayed inside the intent picker when invoked.
+</p>
+<p>
+For more information on intents, refer to the <a href="dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html">Web Intents specification</a> and <a href="http://www.webintents.org">webintents.org</a>.
+</p></div>
<!-- API PAGE -->
<!-- /apiPage -->
</div> <!-- /gc-pagecontent -->

Powered by Google App Engine
This is Rietveld 408576698