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

Side by Side Diff: native_client_sdk/doc_generated/devguide/distributing.html

Issue 912633002: NaCl docs: clarify Chrome apps instead of packaged apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="distributing-your-application"> 3 <section id="distributing-your-application">
4 <span id="distributing"></span><h1 id="distributing-your-application"><span id=" distributing"></span>Distributing Your Application</h1> 4 <span id="distributing"></span><h1 id="distributing-your-application"><span id=" distributing"></span>Distributing Your Application</h1>
5 <div class="contents local" id="contents" style="display: none"> 5 <div class="contents local" id="contents" style="display: none">
6 <ul class="small-gap"> 6 <ul class="small-gap">
7 <li><a class="reference internal" href="#portable-native-client" id="id1">Portab le Native Client</a></li> 7 <li><a class="reference internal" href="#portable-native-client" id="id2">Portab le Native Client</a></li>
8 <li><p class="first"><a class="reference internal" href="#non-portable-native-cl ient" id="id2">Non-portable Native Client</a></p> 8 <li><p class="first"><a class="reference internal" href="#non-portable-native-cl ient" id="id3">Non-portable Native Client</a></p>
9 <ul class="small-gap"> 9 <ul class="small-gap">
10 <li><a class="reference internal" href="#packaged-application" id="id3">Packaged application</a></li> 10 <li><a class="reference internal" href="#chrome-apps" id="id4">Chrome apps</a></ li>
11 <li><a class="reference internal" href="#extension" id="id4">Extension</a></li> 11 <li><a class="reference internal" href="#extension" id="id5">Extension</a></li>
12 <li><a class="reference internal" href="#hosted-application" id="id5">Hosted app lication</a></li> 12 <li><a class="reference internal" href="#hosted-application" id="id6">Hosted app lication</a></li>
13 <li><a class="reference internal" href="#registering-native-client-modules-to-ha ndle-mime-types" id="id6">Registering Native Client modules to handle MIME types </a></li> 13 <li><a class="reference internal" href="#registering-native-client-modules-to-ha ndle-mime-types" id="id7">Registering Native Client modules to handle MIME types </a></li>
14 </ul> 14 </ul>
15 </li> 15 </li>
16 </ul> 16 </ul>
17 17
18 </div><p>This document describes how to distribute Portable Native Client applic ations 18 </div><p>This document describes how to distribute Portable Native Client applic ations
19 on the web, and Native Client applications through the 19 on the web, and Native Client applications through the
20 <a class="reference external" href="/webstore">Chrome Web Store</a> (CWS).</p> 20 <a class="reference external" href="/webstore">Chrome Web Store</a> (CWS).</p>
21 <h2 id="portable-native-client">Portable Native Client</h2> 21 <h2 id="portable-native-client">Portable Native Client</h2>
22 <p>Portable Native Client is enabled by default for web pages, so no separate 22 <p>Portable Native Client is enabled by default for web pages, so no separate
23 distribution step is requred. Making PNaCl a part of your web application is as 23 distribution step is requred. Making PNaCl a part of your web application is as
(...skipping 10 matching lines...) Expand all
34 Web Store (CWS)</a> 34 Web Store (CWS)</a>
35 The CWS requirement is in place to prevent the proliferation of Native Client 35 The CWS requirement is in place to prevent the proliferation of Native Client
36 executables (<strong>nexe</strong>s) compiled for specific architecures (e.g., x 86-32, 36 executables (<strong>nexe</strong>s) compiled for specific architecures (e.g., x 86-32,
37 x86-64, or ARM).</p> 37 x86-64, or ARM).</p>
38 <p>In general, the considerations and guidelines for distributing applications 38 <p>In general, the considerations and guidelines for distributing applications
39 through the Chrome Web Store apply to applications that contain NaCl modules as 39 through the Chrome Web Store apply to applications that contain NaCl modules as
40 well. Here are a few pointers to relevant documentation:</p> 40 well. Here are a few pointers to relevant documentation:</p>
41 <ul class="small-gap"> 41 <ul class="small-gap">
42 <li><a class="reference external" href="/webstore">CWS Overview</a></li> 42 <li><a class="reference external" href="/webstore">CWS Overview</a></li>
43 <li><a class="reference external" href="/webstore/choosing">Choosing an App Type </a></li> 43 <li><a class="reference external" href="/webstore/choosing">Choosing an App Type </a></li>
44 <li><a class="reference external" href="/apps/about_apps">Getting started with p ackaged apps</a></li> 44 <li><a class="reference external" href="/apps">Getting started with Chrome apps< /a></li>
45 <li><a class="reference external" href="https://developers.google.com/chrome/app s/docs/developers_guide">Hosted apps</a></li>
46 <li><a class="reference external" href="/extensions">Chrome extensions</a></li> 45 <li><a class="reference external" href="/extensions">Chrome extensions</a></li>
47 </ul> 46 </ul>
48 <p>In this document, we&#8217;ll focus only on distribution issues specific to 47 <p>In this document, we&#8217;ll focus only on distribution issues specific to
49 applications that contain NaCl modules.</p> 48 applications that contain NaCl modules.</p>
50 <h3 id="packaged-application"><span id="distributing-packaged"></span>Packaged a pplication</h3> 49 <h3 id="chrome-apps"><span id="distributing-packaged"></span>Chrome apps</h3>
51 <p>A packaged application is a special zip file (with a .crx extension) hosted i n 50 <p>A Chrome app is a special zip file (with a .crx extension) hosted in the Chro me
52 the Chrome Web Store. This file contains all of the application parts: A Chrome 51 Web Store. This file contains all of the application parts: A Chrome Web Store
53 Web Store manifest file (manifest.json), an icon, and all of the regular Native 52 manifest file (manifest.json), an icon, and all of the regular Native Client
54 Client application files. Refer to 53 application files. Refer to <a class="reference external" href="/apps">Chrome Ap ps</a> for more information about
55 <a class="reference external" href="/apps/about_apps">Packaged Apps</a> 54 creating a Chrome app.</p>
56 for more information about creating a packaged application.</p>
57 <h4 id="reducing-the-size-of-the-user-download-package">Reducing the size of the user download package</h4> 55 <h4 id="reducing-the-size-of-the-user-download-package">Reducing the size of the user download package</h4>
58 <aside class="note"> 56 <aside class="note">
59 <strong>Tip:</strong> 57 <strong>Tip:</strong>
60 Packaging an app in a multi-platform zip file can significantly reduce the 58 Packaging an app in a multi-platform zip file can significantly reduce the
61 download and storage requirements for the app. 59 download and storage requirements for the app.
62 </aside> 60 </aside>
63 <p>As described above, to upload a packaged app to the CWS you have to create a zip 61 <p>As described above, to upload a Chrome app to the CWS you have to create a zi p
64 file with all the resources that your app needs, including .nexe files for 62 file with all the resources that your app needs, including .nexe files for
65 multiple architectures (x86-64, x86-32, and ARM). Prior to Chrome 28, when users 63 multiple architectures (x86-64, x86-32, and ARM). Prior to Chrome 28, when users
66 installed your app they had to download a .crx file from the CWS with all the 64 installed your app they had to download a .crx file from the CWS with all the
67 included .nexe files.</p> 65 included .nexe files.</p>
68 <p>Starting with Chrome 28, the Chrome Web Store includes a feature called 66 <p>Starting with Chrome 28, the Chrome Web Store includes a feature called
69 <strong>multi-platform zip files.</strong> This feature lets you structure your application 67 <strong>multi-platform zip files.</strong> This feature lets you structure your application
70 directory and zip file in a way that reduces the size of the user download 68 directory and zip file in a way that reduces the size of the user download
71 package. Here&#8217;s how this feature works:</p> 69 package. Here&#8217;s how this feature works:</p>
72 <ul class="small-gap"> 70 <ul class="small-gap">
73 <li>You still include all the .nexe files in the zip file that you upload to 71 <li>You still include all the .nexe files in the zip file that you upload to
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 function getPath(name) { 217 function getPath(name) {
220 return '_platform_specific/' + 218 return '_platform_specific/' +
221 chrome.runtime.getPlatformInfo().nacl_arch + 219 chrome.runtime.getPlatformInfo().nacl_arch +
222 '/' + name; 220 '/' + name;
223 } 221 }
224 </pre> 222 </pre>
225 </li> 223 </li>
226 <li><p class="first">Test your app, create a zip file, and upload the app to the CWS as before.</p> 224 <li><p class="first">Test your app, create a zip file, and upload the app to the CWS as before.</p>
227 </li> 225 </li>
228 </ol> 226 </ol>
229 <h4 id="additional-considerations-for-a-packaged-application"><span id="addition al-considerations-packaged"></span>Additional considerations for a packaged appl ication</h4> 227 <h4 id="additional-considerations-for-a-chrome-app"><span id="additional-conside rations-packaged"></span>Additional considerations for a Chrome app</h4>
230 <ul class="small-gap"> 228 <ul class="small-gap">
231 <li>In the description of your application in the CWS, make sure to mention that 229 <li>In the description of your application in the CWS, make sure to mention that
232 your application is a Native Client application that only works with the 230 your application is a Native Client application that only works with the
233 Chrome browser. Also make sure to identify the minimum version of Chrome 231 Chrome browser. Also make sure to identify the minimum version of Chrome
234 that your application requires.</li> 232 that your application requires.</li>
235 <li><p class="first">Hosted and packaged applications have a &#8220;launch&#8221 ; parameter in the CWS 233 <li><p class="first">Hosted and packaged applications have a &#8220;launch&#8221 ; parameter in the CWS
236 manifest. This parameter is present only in apps (not extensions), and it 234 manifest. This parameter is present only in apps (not extensions), and it
237 tells Google Chrome what to show when a user starts an installed app. For 235 tells Google Chrome what to show when a user starts an installed app. For
238 example:</p> 236 example:</p>
239 <pre> 237 <pre>
240 &quot;launch&quot;: { 238 &quot;launch&quot;: {
241 &quot;web_url&quot;: &quot;http://mail.google.com/mail/&quot; 239 &quot;web_url&quot;: &quot;http://mail.google.com/mail/&quot;
242 } 240 }
243 </pre> 241 </pre>
244 </li> 242 </li>
245 <li>If you want to write local data using the Pepper 243 <li>If you want to write local data using the Pepper
246 <a class="reference external" href="/native-client/peppercpp/classpp_1_1_file_i_ o">FileIO</a> 244 <a class="reference external" href="/native-client/peppercpp/classpp_1_1_file_i_ o">FileIO</a>
247 API, you must set the &#8216;unlimitedStorage&#8217; permission in your Chrome W eb 245 API, you must set the &#8216;unlimitedStorage&#8217; permission in your Chrome W eb
248 Store manifest file, just as you would for a JavaScript application that 246 Store manifest file, just as you would for a JavaScript application that
249 uses the HTML5 File API.</li> 247 uses the HTML5 File API.</li>
250 <li>For packaged applications, you can only use in-app purchases.</li> 248 <li>For Chrome apps, you can only use in-app purchases.</li>
251 <li>You can place your application in the Google Web Store with access only to 249 <li>You can place your application in the Google Web Store with access only to
252 certain people for testing. See <a class="reference external" href="/webstore/pu blish">Publishing to test accounts</a> for more information.</li> 250 certain people for testing. See <a class="reference external" href="/webstore/pu blish">Publishing to test accounts</a> for more information.</li>
253 </ul> 251 </ul>
254 <h3 id="extension">Extension</h3> 252 <h3 id="extension">Extension</h3>
255 <p>The NaCl-specific notes for a <a class="reference internal" href="#distributi ng-packaged"><em>package application</em></a> 253 <p>The NaCl-specific notes for a <a class="reference internal" href="#distributi ng-packaged"><em>package application</em></a>
256 apply to extensions as well.</p> 254 apply to extensions as well.</p>
257 <h3 id="hosted-application">Hosted application</h3> 255 <h3 id="hosted-application">Hosted application</h3>
258 <p>The .html file, .nmf file (Native Client manifest file), and .nexe files must 256 <p>The .html file, .nmf file (Native Client manifest file), and .nexe files must
259 be served from the same domain, and the Chrome Web Store manifest file must 257 be served from the same domain, and the Chrome Web Store manifest file must
260 specify the correct, verified domain. Other files can be served from the same 258 specify the correct, verified domain. Other files can be served from the same
261 or another domain.</p> 259 or another domain.</p>
262 <p>In addition, see <a class="reference internal" href="#additional-consideratio ns-packaged"><em>Additional considerations for a packaged application</em></a>.< /p> 260 <p>In addition, see <a class="reference internal" href="#additional-consideratio ns-packaged"><em>Additional considerations for a Chrome apps</em></a>.</p>
263 <h3 id="registering-native-client-modules-to-handle-mime-types">Registering Nati ve Client modules to handle MIME types</h3> 261 <h3 id="registering-native-client-modules-to-handle-mime-types">Registering Nati ve Client modules to handle MIME types</h3>
264 <p>If you want Chrome to use a Native Client module to display a particular type 262 <p>If you want Chrome to use a Native Client module to display a particular type
265 of content, you can associate the MIME type of that content with the Native 263 of content, you can associate the MIME type of that content with the Native
266 Client module. Use the <code>nacl_modules</code> attribute in the Chrome Web Sto re 264 Client module. Use the <code>nacl_modules</code> attribute in the Chrome Web Sto re
267 manifest file to register a Native Client module as the handler for one or more 265 manifest file to register a Native Client module as the handler for one or more
268 specific MIME types. For example, the bold code in the snippet below registers 266 specific MIME types. For example, the bold code in the snippet below registers
269 a Native Client module as the content handler for the OpenOffice spreadsheet 267 a Native Client module as the content handler for the OpenOffice spreadsheet
270 MIME type:</p> 268 MIME type:</p>
271 <pre> 269 <pre>
272 { 270 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 &quot;mime_type&quot;: &quot;application/vnd.oasis.opendocument.text&quot; 302 &quot;mime_type&quot;: &quot;application/vnd.oasis.opendocument.text&quot;
305 }] 303 }]
306 } 304 }
307 </pre> 305 </pre>
308 <p>The <code>nacl_modules</code> attribute is optional&#8212;specify this attrib ute only if 306 <p>The <code>nacl_modules</code> attribute is optional&#8212;specify this attrib ute only if
309 you want Chrome to use a Native Client module to display a particular type of 307 you want Chrome to use a Native Client module to display a particular type of
310 content.</p> 308 content.</p>
311 </section> 309 </section>
312 310
313 {{/partials.standard_nacl_article}} 311 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698