summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkathyw@chromium.org <kathyw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 22:48:54 +0000
committerkathyw@chromium.org <kathyw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-18 22:48:54 +0000
commit98ad6fdfa07e3a998b3afc3570719f9bb2949e4e (patch)
tree7ed237bc238f4444d84ae8e1e355f150caa49377
parent2f66cdef30aed6f0438dc8b7472d87fc59001fbc (diff)
downloadchromium_src-98ad6fdfa07e3a998b3afc3570719f9bb2949e4e.zip
chromium_src-98ad6fdfa07e3a998b3afc3570719f9bb2949e4e.tar.gz
chromium_src-98ad6fdfa07e3a998b3afc3570719f9bb2949e4e.tar.bz2
Merge 97372 - Add "nacl_modules" field to the manifest doc.
TEST=none BUG=none Review URL: http://codereview.chromium.org/7631054 TBR=kathyw@chromium.org Review URL: http://codereview.chromium.org/7631056 git-svn-id: svn://svn.chromium.org/chrome/branches/835/src@97384 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/manifest.html70
-rw-r--r--chrome/common/extensions/docs/static/manifest.html70
2 files changed, 140 insertions, 0 deletions
diff --git a/chrome/common/extensions/docs/manifest.html b/chrome/common/extensions/docs/manifest.html
index 2338a0c..44e7474 100644
--- a/chrome/common/extensions/docs/manifest.html
+++ b/chrome/common/extensions/docs/manifest.html
@@ -288,6 +288,8 @@
</li><li>
<a href="#name">name</a>
</li><li>
+ <a href="#nacl_modules">nacl_modules</a>
+ </li><li>
<a href="#permissions">permissions</a>
</li><li>
<a href="#version">version</a>
@@ -386,6 +388,7 @@ are <b>name</b> and <b>version</b>.
"<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split",
"<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>": [...],
"<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" },
"<a href="options.html">options_page</a>": "<em>aFile</em>.html",
"<a href="#permissions">permissions</a>": [...],
@@ -622,6 +625,73 @@ You can specify locale-specific strings for this field;
see <a href="i18n.html">Internationalization</a> for details.
</p>
+
+<h3 id="nacl_modules">nacl_modules</h3>
+
+<p>
+One or more mappings from MIME types to the Native Client module
+that handles each type.
+For example, the bold code in the following snippet
+registers a Native Client module as the content handler
+for the OpenOffice spreadsheet MIME type.
+</p>
+
+<pre>{
+ "name": "Native Client OpenOffice Spreadsheet Viewer",
+ "version": "0.1",
+ "description": "Open OpenOffice spreadsheets, right in your browser.",
+ <b>"nacl_modules": [{
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
+ }]</b>
+}
+</pre>
+
+<p>
+The value of "path" is the location of a Native Client manifest
+(a <code>.nmf</code> file)
+within the extension directory.
+For more information on Native Client and <code>.nmf</code> files, see the
+<a href="http://code.google.com/chrome/nativeclient/docs/technical_overview.html">Native Client Technical Overview</a>.
+</p>
+
+<p>
+Each MIME type can be associated with only one <code>.nmf</code> file,
+but a single <code>.nmf</code> file might handle multiple MIME types.
+The following example shows an extension
+with two <code>.nmf</code> files
+that handle three MIME types.
+</p>
+
+<pre>{
+ "name": "Spreadsheet Viewer",
+ "version": "0.1",
+ "description": "Open OpenOffice and Excel spreadsheets, right in your browser.",
+ "nacl_modules": [{
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
+ },
+ {
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet-template"
+ },
+ {
+ "path": "ExcelViewer.nmf",
+ "mime_type": "application/excel"
+ }]
+}
+</pre>
+
+<p class="note">
+<strong>Note:</strong>
+You can use Native Client modules in extensions
+without specifying "nacl_modules".
+Use "nacl_modules" only if you want the browser
+to use your Native Client module
+to display a particular type of content.
+</p>
+
+
<h3 id="permissions">permissions</h3>
<p>
diff --git a/chrome/common/extensions/docs/static/manifest.html b/chrome/common/extensions/docs/static/manifest.html
index 3e9efae..b256aa3 100644
--- a/chrome/common/extensions/docs/static/manifest.html
+++ b/chrome/common/extensions/docs/static/manifest.html
@@ -44,6 +44,7 @@ are <b>name</b> and <b>version</b>.
"<a href="#incognito">incognito</a>": "spanning" <em>or</em> "split",
"<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>": [...],
"<a href="omnibox.html">omnibox</a>": { "keyword": "<em>aString</em>" },
"<a href="options.html">options_page</a>": "<em>aFile</em>.html",
"<a href="#permissions">permissions</a>": [...],
@@ -281,6 +282,75 @@ You can specify locale-specific strings for this field;
see <a href="i18n.html">Internationalization</a> for details.
</p>
+
+<h3 id="nacl_modules">nacl_modules</h3>
+
+<p>
+One or more mappings from MIME types to the Native Client module
+that handles each type.
+For example, the bold code in the following snippet
+registers a Native Client module as the content handler
+for the OpenOffice spreadsheet MIME type.
+</p>
+
+<pre>
+{
+ "name": "Native Client OpenOffice Spreadsheet Viewer",
+ "version": "0.1",
+ "description": "Open OpenOffice spreadsheets, right in your browser.",
+ <b>"nacl_modules": [{
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
+ }]</b>
+}
+</pre>
+
+<p>
+The value of "path" is the location of a Native Client manifest
+(a <code>.nmf</code> file)
+within the extension directory.
+For more information on Native Client and <code>.nmf</code> files, see the
+<a href="http://code.google.com/chrome/nativeclient/docs/technical_overview.html">Native Client Technical Overview</a>.
+</p>
+
+<p>
+Each MIME type can be associated with only one <code>.nmf</code> file,
+but a single <code>.nmf</code> file might handle multiple MIME types.
+The following example shows an extension
+with two <code>.nmf</code> files
+that handle three MIME types.
+</p>
+
+<pre>
+{
+ "name": "Spreadsheet Viewer",
+ "version": "0.1",
+ "description": "Open OpenOffice and Excel spreadsheets, right in your browser.",
+ "nacl_modules": [{
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
+ },
+ {
+ "path": "OpenOfficeViewer.nmf",
+ "mime_type": "application/vnd.oasis.opendocument.spreadsheet-template"
+ },
+ {
+ "path": "ExcelViewer.nmf",
+ "mime_type": "application/excel"
+ }]
+}
+</pre>
+
+<p class="note">
+<strong>Note:</strong>
+You can use Native Client modules in extensions
+without specifying "nacl_modules".
+Use "nacl_modules" only if you want the browser
+to use your Native Client module
+to display a particular type of content.
+</p>
+
+
<h3 id="permissions">permissions</h3>
<p>