| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 function moduleDidLoad() { | 5 function moduleDidLoad() { |
| 6 common.hideModule(); | 6 common.hideModule(); |
| 7 } | 7 } |
| 8 | 8 |
| 9 function $(id) { | 9 function $(id) { |
| 10 return document.getElementById(id); | 10 return document.getElementById(id); |
| 11 } | 11 } |
| 12 | 12 |
| 13 // Called by the common.js module. | 13 // Called by the common.js module. |
| 14 function domContentLoaded(name, tc, config, width, height) { | 14 function domContentLoaded(name, tc, config, width, height) { |
| 15 navigator.webkitPersistentStorage.requestQuota(1024 * 1024, | 15 navigator.webkitPersistentStorage.requestQuota(5 * 1024 * 1024, |
| 16 function(bytes) { | 16 function(bytes) { |
| 17 common.updateStatus( | 17 common.updateStatus( |
| 18 'Allocated ' + bytes + ' bytes of persistant storage.'); | 18 'Allocated ' + bytes + ' bytes of persistant storage.'); |
| 19 common.attachDefaultListeners(); | 19 common.attachDefaultListeners(); |
| 20 common.createNaClModule(name, tc, config, width, height); | 20 common.createNaClModule(name, tc, config, width, height); |
| 21 }, | 21 }, |
| 22 function(e) { alert('Failed to allocate space') }); | 22 function(e) { alert('Failed to allocate space') }); |
| 23 } | 23 } |
| 24 | 24 |
| 25 // Called by the common.js module. | 25 // Called by the common.js module. |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 } | 340 } |
| 341 | 341 |
| 342 delete funcToCallback[funcName]; | 342 delete funcToCallback[funcName]; |
| 343 callback.apply(null, params); | 343 callback.apply(null, params); |
| 344 } | 344 } |
| 345 } else { | 345 } else { |
| 346 common.logMessage('Error: Unknow message `' + data + | 346 common.logMessage('Error: Unknow message `' + data + |
| 347 '` received from NaCl module.'); | 347 '` received from NaCl module.'); |
| 348 } | 348 } |
| 349 } | 349 } |
| OLD | NEW |