Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / articles / manifest / nacl_modules.html
blob4382290e89d739dd2f7a5c4a70cc5c0645919950
1 <h1 id="nacl_modules">Manifest - Nacl Modules</h1>
3 <p>
4 One or more mappings from MIME types to the Native Client module
5 that handles each type.
6 For example, the bold code in the following snippet
7 registers a Native Client module as the content handler
8 for the OpenOffice spreadsheet MIME type.
9 </p>
11 <pre data-filename="manifest.json">
13 "name": "Native Client OpenOffice Spreadsheet Viewer",
14 "version": "0.1",
15 "description": "Open OpenOffice spreadsheets, right in your browser.",
16 <b>"nacl_modules": [{
17 "path": "OpenOfficeViewer.nmf",
18 "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
19 }]</b>
21 </pre>
23 <p>
24 The value of "path" is the location of a Native Client manifest
25 (a <code>.nmf</code> file)
26 within the extension directory.
27 For more information on Native Client and <code>.nmf</code> files, see the
28 <a href="http://code.google.com/chrome/nativeclient/docs/technical_overview.html">Native Client Technical Overview</a>.
29 </p>
31 <p>
32 Each MIME type can be associated with only one <code>.nmf</code> file,
33 but a single <code>.nmf</code> file might handle multiple MIME types.
34 The following example shows an extension
35 with two <code>.nmf</code> files
36 that handle three MIME types.
37 </p>
39 <pre data-filename="manifest.json">
41 "name": "Spreadsheet Viewer",
42 "version": "0.1",
43 "description": "Open OpenOffice and Excel spreadsheets, right in your browser.",
44 "nacl_modules": [{
45 "path": "OpenOfficeViewer.nmf",
46 "mime_type": "application/vnd.oasis.opendocument.spreadsheet"
49 "path": "OpenOfficeViewer.nmf",
50 "mime_type": "application/vnd.oasis.opendocument.spreadsheet-template"
53 "path": "ExcelViewer.nmf",
54 "mime_type": "application/excel"
57 </pre>
59 <p class="note">
60 <strong>Note:</strong>
61 You can use Native Client modules in extensions
62 without specifying "nacl_modules".
63 Use "nacl_modules" only if you want the browser
64 to use your Native Client module
65 to display a particular type of content.
66 </p>