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 = 229855; | 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 + '/earth/' + name; | 47 return baseUrl + revision + '/earth/' + 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 createNaClModule('earth', 480, 480); | 267 createNaClModule('earth', 480, 480); |
268 attachDefaultListeners(); | 268 attachDefaultListeners(); |
269 } else { | 269 } else { |
270 // It's possible that the Native Client module onload event fired | 270 // It's possible that the Native Client module onload event fired |
271 // before the page's onload event. In this case, the status message | 271 // before the page's onload event. In this case, the status message |
272 // will reflect 'SUCCESS', but won't be displayed. This call will | 272 // will reflect 'SUCCESS', but won't be displayed. This call will |
273 // display the current message. | 273 // display the current message. |
274 updateStatus('Waiting.'); | 274 updateStatus('Waiting.'); |
275 } | 275 } |
276 }); | 276 }); |
OLD | NEW |