Reflect scanning status in command UI. Only allow import once scanning is complete.
This is a sizeable change that reworks the flow of control.
Introduce an ImportController in the foreground that manages scanning.
Move cloud-import command logic out of file_manager_commands into ImportController.
Update MediaImportHandler to accept a ScanResult instead of an array of entries.
Make MediaScanner observable, so that commands can be updated when a scan finishes.
NOTE: I due to slow and frequently broken (not by me) ChromeOS builds, I have not yet sucessfully tested this on ChromeOS. Still, I wanted to get the change mailed. All tests are passing. I'll remedy the situation with ChromeOS ASAP.
BUG=
420680
TEST=browser_test: FileManagerJsTest.*
Committed:
https://crrev.com/66e1ad07571c8d2d1a64adab5e03680d07fac03f
Cr-Commit-Position: refs/heads/master@{#309229}