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 + '/voronoi/' + name; | 47 return baseUrl + revision + '/voronoi/' + 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 createNaClModule('voronoi', 512, 512); | 224 createNaClModule('voronoi', 512, 512); |
225 attachDefaultListeners(); | 225 attachDefaultListeners(); |
226 } else { | 226 } else { |
227 // It's possible that the Native Client module onload event fired | 227 // It's possible that the Native Client module onload event fired |
228 // before the page's onload event. In this case, the status message | 228 // before the page's onload event. In this case, the status message |
229 // will reflect 'SUCCESS', but won't be displayed. This call will | 229 // will reflect 'SUCCESS', but won't be displayed. This call will |
230 // display the current message. | 230 // display the current message. |
231 updateStatus('Waiting.'); | 231 updateStatus('Waiting.'); |
232 } | 232 } |
233 }); | 233 }); |
OLD | NEW |