alloy: Fix crash when downloading a modified PDF form (see issue #3169)

Create a CefFileSystemDelegate based on the ShellFileSystemDelegate placeholder
implementation. An actual implementation will still be required to properly
support this download functionality.
This commit is contained in:
Cristian Amarie
2021-08-19 22:05:52 +03:00
committed by Marshall Greenblatt
parent 318f46bf46
commit eac16430da
5 changed files with 142 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "include/internal/cef_types_wrappers.h"
#include "libcef/browser/browser_context.h"
#include "libcef/browser/extensions/api/file_system/cef_file_system_delegate.h"
#include "libcef/browser/extensions/api/storage/sync_value_store_cache.h"
#include "libcef/browser/extensions/extension_web_contents_observer.h"
#include "libcef/browser/extensions/mime_handler_view_guest_delegate.h"
@ -74,4 +75,10 @@ void CefExtensionsAPIClient::AddAdditionalValueStoreCaches(
(*caches)[settings_namespace::SYNC] = new cef::SyncValueStoreCache(factory);
}
FileSystemDelegate* CefExtensionsAPIClient::GetFileSystemDelegate() {
if (!file_system_delegate_)
file_system_delegate_ = std::make_unique<cef::CefFileSystemDelegate>();
return file_system_delegate_.get();
}
} // namespace extensions