diff options
author | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 20:41:34 +0000 |
---|---|---|
committer | groby@chromium.org <groby@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-14 20:41:34 +0000 |
commit | 4c228b8cae6abf129e97e5efa047499e65c636ed (patch) | |
tree | 9e40630ea13bb86b5181c1494a651b6b75f07e11 /chrome/common/extensions | |
parent | 8b01a13066a714fe9e4c30e64de200f006905534 (diff) | |
download | chromium_src-4c228b8cae6abf129e97e5efa047499e65c636ed.zip chromium_src-4c228b8cae6abf129e97e5efa047499e65c636ed.tar.gz chromium_src-4c228b8cae6abf129e97e5efa047499e65c636ed.tar.bz2 |
Updated docs to explain "intents" section in extension manifest.
BUG=116171
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9618033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions')
-rw-r--r-- | chrome/common/extensions/docs/README.txt | 7 | ||||
-rw-r--r-- | chrome/common/extensions/docs/manifest.html | 40 | ||||
-rw-r--r-- | chrome/common/extensions/docs/static/manifest.html | 47 |
3 files changed, 92 insertions, 2 deletions
diff --git a/chrome/common/extensions/docs/README.txt b/chrome/common/extensions/docs/README.txt index 310e4e3..d471b98 100644 --- a/chrome/common/extensions/docs/README.txt +++ b/chrome/common/extensions/docs/README.txt @@ -21,10 +21,13 @@ and make a copy of /template/page_shell.html and copy it to /<page>.html. *I want to edit or add a purely static page: =>Follow the same steps for editing static content for an API page. -IN ALL CASES. When you have finished, run build/build.bat (on windows) or -build/build.py (on mac/linux). This may generate new files or changes to the +IN ALL CASES. When you have finished, run ./build/build.bat (on windows) or +./build/build.py (on mac/linux). This may generate new files or changes to the /*.html pages. Include any new or changed files in the changelist you create. +When submitting changes for review, please host the contents of your version +of chrome/common/extensions/docs on a web server accessible to your reviewer. + -------------------------------------------------------------------------------- Building diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html index ab5be7a..4fe1320 100644 --- a/chrome/common/extensions/docs/manifest.html +++ b/chrome/common/extensions/docs/manifest.html @@ -211,6 +211,8 @@ </li><li> <a href="#incognito">incognito</a> </li><li> + <a href="#intents">intents</a> + </li><li> <a href="#key">key</a> </li><li> <a href="#minimum_chrome_version">minimum_chrome_version</a> @@ -275,6 +277,7 @@ are <b>name</b> and <b>version</b>. "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...], "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>", "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split", + "<a href="#intents">intents</a>": {...} "<a href="#key">key</a>": "<em>publicKey</em>", "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionString</em>", "<a href="#nacl_modules">nacl_modules</a>": [...], @@ -416,6 +419,43 @@ As a rule of thumb, if your extension or app needs to load a tab in an incognito into a remote server or persist settings locally, use <em>spanning</em> incognito behavior. </p> +<h3 id="intents">intents</h3> +<p> +A dictionary that specifies all intent handlers provided by this extension or app. Each key in the dictionary specifies the an action verb that is handled by this extension. The following example specifies two handlers for the action verb "<a href="http://webintents.org/share">http://webintents.org/share</a>". +</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. The "href" 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> +The "title" is displayed in the intent picker UI when the user initiates the action specific to the handler. +</p> +<p> +The "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="http://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> <h3 id="key">key</h3> <p> This value can be used to control diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html index 0149fdf..a0cb4b4 100644 --- a/chrome/common/extensions/docs/static/manifest.html +++ b/chrome/common/extensions/docs/static/manifest.html @@ -43,6 +43,7 @@ are <b>name</b> and <b>version</b>. "<a href="fileBrowserHandler.html">file_browser_handlers</a>": [...], "<a href="#homepage_url">homepage_url</a>": "http://<em>path/to/homepage</em>", "<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split", + "<a href="#intents">intents</a>": {...} "<a href="#key">key</a>": "<em>publicKey</em>", "<a href="#minimum_chrome_version">minimum_chrome_version</a>": "<em>versionString</em>", @@ -211,6 +212,51 @@ into a remote server or persist settings locally, use <em>spanning</em> incognito behavior. </p> +<h3 id="intents">intents</h3> + +<p> +A dictionary that specifies all intent handlers provided by this extension or app. Each key in the dictionary specifies the an action verb that is handled by this extension. The following example specifies two handlers for the action verb "<a href="http://webintents.org/share">http://webintents.org/share</a>". +</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. The "href" 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> +The "title" is displayed in the intent picker UI when the user initiates the action specific to the handler. +</p> + +<p> +The "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="http://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> + <h3 id="key">key</h3> <p> @@ -758,3 +804,4 @@ 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> + |