#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-blink.h"
#include <math.h>
#include <stdint.h>
#include <utility>
#include "base/debug/alias.h"
#include "base/hash/md5_constexpr.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/typed_macros.h"
#include "mojo/public/cpp/bindings/features.h"
#include "mojo/public/cpp/bindings/lib/default_construct_tag_internal.h"
#include "mojo/public/cpp/bindings/lib/generated_code_util.h"
#include "mojo/public/cpp/bindings/lib/message_internal.h"
#include "mojo/public/cpp/bindings/lib/proxy_to_responder.h"
#include "mojo/public/cpp/bindings/lib/send_message_helper.h"
#include "mojo/public/cpp/bindings/lib/serialization_util.h"
#include "mojo/public/cpp/bindings/lib/unserialized_message_context.h"
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/mojo_buildflags.h"
#include "mojo/public/cpp/bindings/urgent_message_scope.h"
#include "mojo/public/interfaces/bindings/interface_control_messages.mojom.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-params-data.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_manager.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
ChooseFileSystemEntryAcceptsOption::ChooseFileSystemEntryAcceptsOption()
: … { … }
ChooseFileSystemEntryAcceptsOption::ChooseFileSystemEntryAcceptsOption(
const ::WTF::String& description_in,
WTF::Vector<WTF::String> mime_types_in,
WTF::Vector<WTF::String> extensions_in)
: … { … }
ChooseFileSystemEntryAcceptsOption::~ChooseFileSystemEntryAcceptsOption() = default;
void ChooseFileSystemEntryAcceptsOption::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool ChooseFileSystemEntryAcceptsOption::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
AcceptsTypesInfo::AcceptsTypesInfo()
: … { … }
AcceptsTypesInfo::AcceptsTypesInfo(
WTF::Vector<ChooseFileSystemEntryAcceptsOptionPtr> accepts_in,
bool include_accepts_all_in)
: … { … }
AcceptsTypesInfo::~AcceptsTypesInfo() = default;
void AcceptsTypesInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool AcceptsTypesInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
OpenFilePickerOptions::OpenFilePickerOptions()
: … { … }
OpenFilePickerOptions::OpenFilePickerOptions(
AcceptsTypesInfoPtr accepts_types_info_in,
bool can_select_multiple_files_in)
: … { … }
OpenFilePickerOptions::~OpenFilePickerOptions() = default;
void OpenFilePickerOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool OpenFilePickerOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
SaveFilePickerOptions::SaveFilePickerOptions()
: … { … }
SaveFilePickerOptions::SaveFilePickerOptions(
AcceptsTypesInfoPtr accepts_types_info_in,
const WTF::String& suggested_name_in)
: … { … }
SaveFilePickerOptions::~SaveFilePickerOptions() = default;
void SaveFilePickerOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool SaveFilePickerOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
DirectoryPickerOptions::DirectoryPickerOptions()
: … { … }
DirectoryPickerOptions::DirectoryPickerOptions(
bool request_writable_in)
: … { … }
DirectoryPickerOptions::~DirectoryPickerOptions() = default;
size_t DirectoryPickerOptions::Hash(size_t seed) const { … }
void DirectoryPickerOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool DirectoryPickerOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
FilePickerOptions::FilePickerOptions()
: … { … }
FilePickerOptions::FilePickerOptions(
TypeSpecificFilePickerOptionsUnionPtr type_specific_options_in,
const WTF::String& starting_directory_id_in,
FilePickerStartInOptionsUnionPtr start_in_options_in)
: … { … }
FilePickerOptions::~FilePickerOptions() = default;
void FilePickerOptions::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool FilePickerOptions::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
TypeSpecificFilePickerOptionsUnion::TypeSpecificFilePickerOptionsUnion() : … { … }
TypeSpecificFilePickerOptionsUnion::~TypeSpecificFilePickerOptionsUnion() { … }
void TypeSpecificFilePickerOptionsUnion::set_open_file_picker_options(
OpenFilePickerOptionsPtr open_file_picker_options) { … }
void TypeSpecificFilePickerOptionsUnion::set_save_file_picker_options(
SaveFilePickerOptionsPtr save_file_picker_options) { … }
void TypeSpecificFilePickerOptionsUnion::set_directory_picker_options(
DirectoryPickerOptionsPtr directory_picker_options) { … }
void TypeSpecificFilePickerOptionsUnion::DestroyActive() { … }
bool TypeSpecificFilePickerOptionsUnion::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
FilePickerStartInOptionsUnion::FilePickerStartInOptionsUnion() : … { … }
FilePickerStartInOptionsUnion::~FilePickerStartInOptionsUnion() { … }
void FilePickerStartInOptionsUnion::set_well_known_directory(
WellKnownDirectory well_known_directory) { … }
void FilePickerStartInOptionsUnion::set_directory_token(
::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessTransferToken> directory_token) { … }
void FilePickerStartInOptionsUnion::DestroyActive() { … }
bool FilePickerStartInOptionsUnion::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FileSystemAccessManager::Name_[] = …;
FileSystemAccessManager::IPCStableHashFunction FileSystemAccessManager::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FileSystemAccessManager::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FileSystemAccessManager::GetSandboxedFileSystem_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::GetSandboxedFileSystemForDevtools_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::ChooseEntries_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::GetFileHandleFromToken_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::GetDirectoryHandleFromToken_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::GetEntryFromDataTransferToken_Sym::IPCStableHash() { … }
uint32_t FileSystemAccessManager::BindObserverHost_Sym::IPCStableHash() { … }
# endif
class FileSystemAccessManager_GetSandboxedFileSystem_ForwardToCallback
: public mojo::MessageReceiver { … };
class FileSystemAccessManager_GetSandboxedFileSystemForDevtools_ForwardToCallback
: public mojo::MessageReceiver { … };
class FileSystemAccessManager_ChooseEntries_ForwardToCallback
: public mojo::MessageReceiver { … };
class FileSystemAccessManager_GetEntryFromDataTransferToken_ForwardToCallback
: public mojo::MessageReceiver { … };
FileSystemAccessManagerProxy::FileSystemAccessManagerProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FileSystemAccessManagerProxy::GetSandboxedFileSystem(
GetSandboxedFileSystemCallback callback) { … }
void FileSystemAccessManagerProxy::GetSandboxedFileSystemForDevtools(
const WTF::Vector<WTF::String>& in_directory_path_components, GetSandboxedFileSystemForDevtoolsCallback callback) { … }
void FileSystemAccessManagerProxy::ChooseEntries(
FilePickerOptionsPtr in_options, ChooseEntriesCallback callback) { … }
void FileSystemAccessManagerProxy::GetFileHandleFromToken(
::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessTransferToken> in_token, ::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessFileHandle> in_file_handle) { … }
void FileSystemAccessManagerProxy::GetDirectoryHandleFromToken(
::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessTransferToken> in_token, ::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessDirectoryHandle> in_directory_handle) { … }
void FileSystemAccessManagerProxy::GetEntryFromDataTransferToken(
::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDataTransferToken> in_token, GetEntryFromDataTransferTokenCallback callback) { … }
void FileSystemAccessManagerProxy::BindObserverHost(
::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessObserverHost> in_observer_host) { … }
class FileSystemAccessManager_GetSandboxedFileSystem_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileSystemAccessManager_GetSandboxedFileSystem_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileSystemAccessManager_GetSandboxedFileSystem_ProxyToResponder::Run(
::blink::mojom::blink::FileSystemAccessErrorPtr in_result, ::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDirectoryHandle> in_directory) { … }
class FileSystemAccessManager_GetSandboxedFileSystemForDevtools_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileSystemAccessManager_GetSandboxedFileSystemForDevtools_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileSystemAccessManager_GetSandboxedFileSystemForDevtools_ProxyToResponder::Run(
::blink::mojom::blink::FileSystemAccessErrorPtr in_result, ::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDirectoryHandle> in_directory) { … }
class FileSystemAccessManager_ChooseEntries_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileSystemAccessManager_ChooseEntries_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileSystemAccessManager_ChooseEntries_ProxyToResponder::Run(
::blink::mojom::blink::FileSystemAccessErrorPtr in_result, WTF::Vector<::blink::mojom::blink::FileSystemAccessEntryPtr> in_entries) { … }
class FileSystemAccessManager_GetEntryFromDataTransferToken_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileSystemAccessManager_GetEntryFromDataTransferToken_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileSystemAccessManager_GetEntryFromDataTransferToken_ProxyToResponder::Run(
::blink::mojom::blink::FileSystemAccessErrorPtr in_result, ::blink::mojom::blink::FileSystemAccessEntryPtr in_entry) { … }
bool FileSystemAccessManagerStubDispatch::Accept(
FileSystemAccessManager* impl,
mojo::Message* message) { … }
bool FileSystemAccessManagerStubDispatch::AcceptWithResponder(
FileSystemAccessManager* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFileSystemAccessManagerValidationInfo[] = …;
bool FileSystemAccessManagerRequestValidator::Accept(mojo::Message* message) { … }
bool FileSystemAccessManagerResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::ChooseFileSystemEntryAcceptsOption::DataView, ::blink::mojom::blink::ChooseFileSystemEntryAcceptsOptionPtr>::Read(
::blink::mojom::blink::ChooseFileSystemEntryAcceptsOption::DataView input,
::blink::mojom::blink::ChooseFileSystemEntryAcceptsOptionPtr* output) { … }
bool StructTraits<::blink::mojom::blink::AcceptsTypesInfo::DataView, ::blink::mojom::blink::AcceptsTypesInfoPtr>::Read(
::blink::mojom::blink::AcceptsTypesInfo::DataView input,
::blink::mojom::blink::AcceptsTypesInfoPtr* output) { … }
bool StructTraits<::blink::mojom::blink::OpenFilePickerOptions::DataView, ::blink::mojom::blink::OpenFilePickerOptionsPtr>::Read(
::blink::mojom::blink::OpenFilePickerOptions::DataView input,
::blink::mojom::blink::OpenFilePickerOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::SaveFilePickerOptions::DataView, ::blink::mojom::blink::SaveFilePickerOptionsPtr>::Read(
::blink::mojom::blink::SaveFilePickerOptions::DataView input,
::blink::mojom::blink::SaveFilePickerOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::DirectoryPickerOptions::DataView, ::blink::mojom::blink::DirectoryPickerOptionsPtr>::Read(
::blink::mojom::blink::DirectoryPickerOptions::DataView input,
::blink::mojom::blink::DirectoryPickerOptionsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::FilePickerOptions::DataView, ::blink::mojom::blink::FilePickerOptionsPtr>::Read(
::blink::mojom::blink::FilePickerOptions::DataView input,
::blink::mojom::blink::FilePickerOptionsPtr* output) { … }
bool UnionTraits<::blink::mojom::blink::TypeSpecificFilePickerOptionsUnion::DataView, ::blink::mojom::blink::TypeSpecificFilePickerOptionsUnionPtr>::Read(
::blink::mojom::blink::TypeSpecificFilePickerOptionsUnion::DataView input,
::blink::mojom::blink::TypeSpecificFilePickerOptionsUnionPtr* output) { … }
bool UnionTraits<::blink::mojom::blink::FilePickerStartInOptionsUnion::DataView, ::blink::mojom::blink::FilePickerStartInOptionsUnionPtr>::Read(
::blink::mojom::blink::FilePickerStartInOptionsUnion::DataView input,
::blink::mojom::blink::FilePickerStartInOptionsUnionPtr* output) { … }
}
namespace blink::mojom::blink {
void FileSystemAccessManagerInterceptorForTesting::GetSandboxedFileSystem(GetSandboxedFileSystemCallback callback) { … }
void FileSystemAccessManagerInterceptorForTesting::GetSandboxedFileSystemForDevtools(const WTF::Vector<WTF::String>& directory_path_components, GetSandboxedFileSystemForDevtoolsCallback callback) { … }
void FileSystemAccessManagerInterceptorForTesting::ChooseEntries(FilePickerOptionsPtr options, ChooseEntriesCallback callback) { … }
void FileSystemAccessManagerInterceptorForTesting::GetFileHandleFromToken(::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessTransferToken> token, ::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessFileHandle> file_handle) { … }
void FileSystemAccessManagerInterceptorForTesting::GetDirectoryHandleFromToken(::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessTransferToken> token, ::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessDirectoryHandle> directory_handle) { … }
void FileSystemAccessManagerInterceptorForTesting::GetEntryFromDataTransferToken(::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDataTransferToken> token, GetEntryFromDataTransferTokenCallback callback) { … }
void FileSystemAccessManagerInterceptorForTesting::BindObserverHost(::mojo::PendingReceiver<::blink::mojom::blink::FileSystemAccessObserverHost> observer_host) { … }
FileSystemAccessManagerAsyncWaiter::FileSystemAccessManagerAsyncWaiter(
FileSystemAccessManager* proxy) : … { … }
FileSystemAccessManagerAsyncWaiter::~FileSystemAccessManagerAsyncWaiter() = default;
void FileSystemAccessManagerAsyncWaiter::GetSandboxedFileSystem(
::blink::mojom::blink::FileSystemAccessErrorPtr* out_result, ::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDirectoryHandle>* out_directory) { … }
void FileSystemAccessManagerAsyncWaiter::GetSandboxedFileSystemForDevtools(
const WTF::Vector<WTF::String>& directory_path_components, ::blink::mojom::blink::FileSystemAccessErrorPtr* out_result, ::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDirectoryHandle>* out_directory) { … }
void FileSystemAccessManagerAsyncWaiter::ChooseEntries(
FilePickerOptionsPtr options, ::blink::mojom::blink::FileSystemAccessErrorPtr* out_result, WTF::Vector<::blink::mojom::blink::FileSystemAccessEntryPtr>* out_entries) { … }
void FileSystemAccessManagerAsyncWaiter::GetEntryFromDataTransferToken(
::mojo::PendingRemote<::blink::mojom::blink::FileSystemAccessDataTransferToken> token, ::blink::mojom::blink::FileSystemAccessErrorPtr* out_result, ::blink::mojom::blink::FileSystemAccessEntryPtr* out_entry) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif