Enable fast file loads for chrome://media-app.
This cl changes the way we load files such that 1. we load a single file, after this users can interact with the app. 2. we asynchronously load every other related file in that directory, will update the app when it is done. Notably: * adds a way to register observers to AbstractFileList * adds a way to add files and notify observers to ReceivedFileList * adds IPC to 'load-extra-files' * adds `processOtherFilesInDirectory` & `globalLaunchNumber` which keeps loads in sync Existing tests provide a lot of coverage for the new codepaths, however there are edge cases such as loading the first file then doing one of the following 1. invoking launchable IPC i.e. rename 2. invoking non launchable IPC i.e. delete / save 3. start an edit (or another action) changing the UI This cl adds tests for 1 & 2. in the case of 1, we have a token `globalLaunchNumber` to make sure only the most recent load is fulfilled. in the case of 2, we load files as normal as the previous focus file is now removed from the file system. 3. is handled internally in cl/317047655 Bug: b/158043802, 996088 Change-Id: I23e05efa1ffb9c720a116f63e06ca8565dcc7539 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249266 Commit-Queue: David Lei <dlei@google.com> Reviewed-by:Trent Apted <tapted@chromium.org> Cr-Commit-Position: refs/heads/master@{#780696}
Showing
Please register or sign in to comment