| 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 var presets = [ | 8 var presets = [ |
| 9 [[15.2,32.1,7.6],[3,0.329,0.15,0.321,0.145,0.709,3,2,4,0.269,0.662],[0,"#00000
0",3,"#f5f5c1",12,"#158a34",68,"#89e681",100]], | 9 [[15.2,32.1,7.6],[3,0.329,0.15,0.321,0.145,0.709,3,2,4,0.269,0.662],[0,"#00000
0",3,"#f5f5c1",12,"#158a34",68,"#89e681",100]], |
| 10 [[15.2,32.1,5],[3,0.273,0.117,0.288,0.243,0.348,3,2,4,0.269,0.662],[1,"#000000
",3,"#f5f5c1",8,"#158a34",17,"#89e681",20]], | 10 [[15.2,32.1,5],[3,0.273,0.117,0.288,0.243,0.348,3,2,4,0.269,0.662],[1,"#000000
",3,"#f5f5c1",8,"#158a34",17,"#89e681",20]], |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 return navigator.mimeTypes[mimetype] !== undefined; | 46 return navigator.mimeTypes[mimetype] !== undefined; |
| 47 } | 47 } |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Get the URL for Google Cloud Storage. | 50 * Get the URL for Google Cloud Storage. |
| 51 * | 51 * |
| 52 * @param {string} name The relative path to the file. | 52 * @param {string} name The relative path to the file. |
| 53 * @return {string} | 53 * @return {string} |
| 54 */ | 54 */ |
| 55 function getDataURL(name) { | 55 function getDataURL(name) { |
| 56 var revision = 231964; | 56 var revision = 233080; |
| 57 var baseUrl = 'http://commondatastorage.googleapis.com/gonacl/demos/publish/'; | 57 var baseUrl = 'http://commondatastorage.googleapis.com/gonacl/demos/publish/'; |
| 58 return baseUrl + revision + '/smoothlife/' + name; | 58 return baseUrl + revision + '/smoothlife/' + name; |
| 59 } | 59 } |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * Create the Native Client <embed> element as a child of the DOM element | 62 * Create the Native Client <embed> element as a child of the DOM element |
| 63 * named "listener". | 63 * named "listener". |
| 64 * | 64 * |
| 65 * @param {string} name The name of the example. | 65 * @param {string} name The name of the example. |
| 66 * @param {number} width The width to create the plugin. | 66 * @param {number} width The width to create the plugin. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 createNaClModule('smoothnacl', 512, 512); | 298 createNaClModule('smoothnacl', 512, 512); |
| 299 attachDefaultListeners(); | 299 attachDefaultListeners(); |
| 300 } else { | 300 } else { |
| 301 // It's possible that the Native Client module onload event fired | 301 // It's possible that the Native Client module onload event fired |
| 302 // before the page's onload event. In this case, the status message | 302 // before the page's onload event. In this case, the status message |
| 303 // will reflect 'SUCCESS', but won't be displayed. This call will | 303 // will reflect 'SUCCESS', but won't be displayed. This call will |
| 304 // display the current message. | 304 // display the current message. |
| 305 updateStatus('Waiting.'); | 305 updateStatus('Waiting.'); |
| 306 } | 306 } |
| 307 }); | 307 }); |
| OLD | NEW |