Move drag drop file data conversions info FileHelper
Refactor only change. Move data conversions into FileHelper where path translation and file sharing for VMs can be done. The current code assumes only Arc is using this code, but we will soon support crostini and pluginvm. FileHelper::GetFilenames receives a list of files from the source window and returns a list of ui::FileInfo. To support this, DragDropOperation::GetFilenames has been refactored to take FileHelper and aura::Window*. FileHelper::GetMimeTypeForUriList now takes target window since the mime type will be different based on target. FileHelper::GetUrlFromPath changed to SendFileInfo which takes a callback to run when data is ready. The async callback allows files to be shared with a VM before sending the data. FileHelper::GetUrlsFromPickle changed to SendPickle which also takes a callback to run when data is ready. Bug: 1144138 Change-Id: I0356d4681705df5be174ac1debff51f4903eb742 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2531087 Commit-Queue: Joel Hockey <joelhockey@chromium.org> Reviewed-by:Mitsuru Oshima <oshima@chromium.org> Cr-Commit-Position: refs/heads/master@{#827027}
Showing
Please register or sign in to comment