Index: chrome/common/extensions/docs/templates/articles/manifest.html |
diff --git a/chrome/common/extensions/docs/templates/articles/manifest.html b/chrome/common/extensions/docs/templates/articles/manifest.html |
index 1e280ea8635ca233ab8e3b6314d29cf22dfb77b0..dee666d908752f67fef0f9feabd203e7241c401c 100644 |
--- a/chrome/common/extensions/docs/templates/articles/manifest.html |
+++ b/chrome/common/extensions/docs/templates/articles/manifest.html |
@@ -57,6 +57,7 @@ are <b>name</b> and <b>version</b>. |
"<a href="npapi.html">plugins</a>": [...], |
"<a href="#requirements">requirements</a>": {...}, |
"<a href="autoupdate.html">update_url</a>": "http://<em>path/to/updateInfo</em>.xml", |
+ "<a href="#url_handlers">url_handlers</a>": {...}, |
"<a href="#web_accessible_resources">web_accessible_resources</a>": [...], |
"<a href="#sandbox">sandbox</a>": [...] |
} |
@@ -113,8 +114,9 @@ see <a href="i18n.html">Internationalization</a> for details. |
<p> |
Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a> |
-to specify what types of files the app can handle. An app can have multiple <code>file_handlers</code>, with each one having an identifier, a list of MIME types that can be handled, and |
-a title. Here's an example of specifying file handlers: |
+to specify what types of files the app can handle. An app can have multiple |
+<code>file_handlers</code>, with each one having an identifier, a list of MIME |
+types that can be handled, and a title. Here's an example of specifying file handlers: |
</p> |
<pre> |
@@ -143,6 +145,44 @@ file manager (currently supported on ChromeOS only) or by providing |
a path on the <a href="../apps/first_app.html#open">command line</a>. |
</p> |
+ |
+<h3 id="url_handlers">url_handlers</h3> |
+ |
+<p> |
+Used by <a href="../apps/app_lifecycle.html#eventpage">packaged apps</a> |
+to specify what URL patterns the app can handle. An app can have multiple |
+<code>url_handlers</code>, with each one having an identifier, a URL pattern |
+that can be handled, and a title. Here's an example of specifying URL handlers: |
+</p> |
+ |
+<pre> |
+"url_handlers": { |
+ "presentation": { |
+ "matches": [ |
+ "https://www.foo.com/presentation/view/*", |
+ "https://www.bar.com/presentation/view/*" |
+ ], |
+ "title": "Open presentation" |
+ }, |
+ "spreadsheet_edit": { |
+ "matches": [ |
+ "https://www.foo.com/spreadsheet/edit/*" |
+ "https://www.bar.com/spreadsheet/edit/*" |
+ ], |
+ "title": "Edit spreadsheet" |
+ } |
+}</pre> |
+ |
+<p> |
+Apps can only register to handle URL patterns within domains they can prove |
+ownership of, as determined by the <a href="https://chrome.google.com/webstore">Chrome Web Store</a>. |
+Apps that do not fulfill this requirement will be rejected by the store. |
+This automatically means that at least a complete domain should always be |
+specified for all patterns in the <code>matches</code> list. Apps can then be |
+passed matching URLs in the $ref:app.runtime.onLaunched event. |
+</p> |
+ |
+ |
<h3 id="homepage_url">homepage_url</h3> |
<p> |
@@ -403,7 +443,7 @@ The "plugins" requirement indicates |
if an app or extension requires NPAPI to run. |
This requirement is enabled by default |
when the manifest includes the |
-<a href="http://developer.chrome.com/extensions/npapi.html">"plugins" field</a>. |
+<a href="http://developer.chrome.com/extensions/npapi.html">"plugins" field</a>. |
For apps and extensions that still work when plugins aren't available, |
you can disable this requirement |
by setting NPAPI to false. |