| 388 | } |
| 389 | |
| 390 | void FileRequestAsync::UpdateProgress() { |
| 391 | #ifndef EMSCRIPTEN |
| 392 | // Fake download for testing event handlers |
| 393 | |
| 394 | if (!IsReady() && Rand::ChanceOf(1, 100)) { |
| 395 | DownloadDone(true); |
| 396 | } |
| 397 | #endif |
| 398 | } |
| 399 | |
| 400 | FileRequestBinding FileRequestAsync::Bind(void(*func)(FileRequestResult*)) { |
| 401 | FileRequestBinding pending = CreatePending(); |