
FileSystemAccess will delegate to WebContentsDelegate for the file chooser when it sets UseFileChooserForFileSystemAccess(). This allows the hosting app to manage file selection and filtering. AwFileSystemAccessPermissionContext is created which allows read and write to any files that the host app allows to be selected and passes in. FileChooserParams in file_chooser.mojom adds a new kOpenDirectory mode which maps to ui::SelectFileDialog::SELECT_FOLDER and will eventually map to a new mode once introduced in WebChromeClient. This change is guarded by flag WebViewFileSystemAccess. When the flag is disabled, we block any call to showSaveFileChooser(), we allow showOpenFileChooser() and it should look the same as Open, and we allow showDirectoryChooser() and map it to OpenMultiple. The flag will be enabled and mappings corrected once WebView API is updated, and a targetSdkVersion check will be added to the flag. Bug: 40101963 Change-Id: I3f989d8190f27ada27551da372f342ba727c8133 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5826000 Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org> Reviewed-by: Nate Fischer <ntfschr@chromium.org> Reviewed-by: Alex Moshchuk <alexmos@chromium.org> Commit-Queue: Joel Hockey <joelhockey@chromium.org> Cr-Commit-Position: refs/heads/main@{#1360853}
File System Access API
This directory contains part of the browser side implementation of the File System Access API.
This specification for API is split across two repositories:
- https://github.com/whatwg/fs/, which specifies features available within the
Origin Private File System, including the
SyncAccessHandle
API, and - https://wicg.github.io/file-system-access/, which additionally specifies
features allowing users to interact with their local file system, primarily
via the
show*Picker()
APIs.
Related directories
//storage/browser/file_system/
contains the
backend this API is built on top of,
blink/renderer/modules/file_system_access
contains the renderer side implementation and
blink/public/mojom/file_system_access
contains the mojom interfaces for these APIs.