OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 'use strict'; | 5 'use strict'; |
6 | 6 |
7 var naclModule = null; | 7 var naclModule = null; |
8 | 8 |
9 /** | 9 /** |
10 * A helper function to abbreviate getElementById. | 10 * A helper function to abbreviate getElementById. |
(...skipping 24 matching lines...) Expand all Loading... |
35 return navigator.mimeTypes[mimetype] !== undefined; | 35 return navigator.mimeTypes[mimetype] !== undefined; |
36 } | 36 } |
37 | 37 |
38 /** | 38 /** |
39 * Get the URL for Google Cloud Storage. | 39 * Get the URL for Google Cloud Storage. |
40 * | 40 * |
41 * @param {string} name The relative path to the file. | 41 * @param {string} name The relative path to the file. |
42 * @return {string} | 42 * @return {string} |
43 */ | 43 */ |
44 function getDataURL(name) { | 44 function getDataURL(name) { |
45 var revision = 231029; | 45 var revision = 233080; |
46 var baseUrl = 'http://commondatastorage.googleapis.com/gonacl/demos/publish/'; | 46 var baseUrl = 'http://commondatastorage.googleapis.com/gonacl/demos/publish/'; |
47 return baseUrl + revision + '/life/' + name; | 47 return baseUrl + revision + '/life/' + name; |
48 } | 48 } |
49 | 49 |
50 /** | 50 /** |
51 * Create the Native Client <embed> element as a child of the DOM element | 51 * Create the Native Client <embed> element as a child of the DOM element |
52 * named "listener". | 52 * named "listener". |
53 * | 53 * |
54 * @param {string} name The name of the example. | 54 * @param {string} name The name of the example. |
55 * @param {number} width The width to create the plugin. | 55 * @param {number} width The width to create the plugin. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 createNaClModule('life', 512, 512); | 185 createNaClModule('life', 512, 512); |
186 attachDefaultListeners(); | 186 attachDefaultListeners(); |
187 } else { | 187 } else { |
188 // It's possible that the Native Client module onload event fired | 188 // It's possible that the Native Client module onload event fired |
189 // before the page's onload event. In this case, the status message | 189 // before the page's onload event. In this case, the status message |
190 // will reflect 'SUCCESS', but won't be displayed. This call will | 190 // will reflect 'SUCCESS', but won't be displayed. This call will |
191 // display the current message. | 191 // display the current message. |
192 updateStatus('Waiting.'); | 192 updateStatus('Waiting.'); |
193 } | 193 } |
194 }); | 194 }); |
OLD | NEW |