#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-private-field"
#endif
#include "third_party/blink/public/mojom/choosers/file_chooser.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/choosers/file_chooser.mojom-params-data.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom-shared-message-ids.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom-blink-import-headers.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom-blink-test-utils.h"
#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
namespace blink::mojom::blink {
FileChooserParams::FileChooserParams()
: … { … }
FileChooserParams::FileChooserParams(
FileChooserParams::Mode mode_in,
const ::WTF::String& title_in,
const ::base::FilePath& default_file_name_in,
WTF::Vector<::base::FilePath> selected_files_in,
WTF::Vector<::WTF::String> accept_types_in,
bool need_local_path_in,
bool use_media_capture_in,
const ::blink::KURL& requestor_in)
: … { … }
FileChooserParams::~FileChooserParams() = default;
void FileChooserParams::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool FileChooserParams::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
NativeFileInfo::NativeFileInfo()
: … { … }
NativeFileInfo::NativeFileInfo(
const ::base::FilePath& file_path_in,
const ::WTF::String& display_name_in)
: … { … }
NativeFileInfo::~NativeFileInfo() = default;
void NativeFileInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool NativeFileInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
FileSystemFileInfo::FileSystemFileInfo()
: … { … }
FileSystemFileInfo::FileSystemFileInfo(
const ::blink::KURL& url_in,
::base::Time modification_time_in,
int64_t length_in)
: … { … }
FileSystemFileInfo::~FileSystemFileInfo() = default;
void FileSystemFileInfo::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool FileSystemFileInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
FileChooserResult::FileChooserResult()
: … { … }
FileChooserResult::FileChooserResult(
WTF::Vector<FileChooserFileInfoPtr> files_in,
const ::base::FilePath& base_directory_in)
: … { … }
FileChooserResult::~FileChooserResult() = default;
void FileChooserResult::WriteIntoTrace(
perfetto::TracedValue traced_context) const { … }
bool FileChooserResult::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
FileChooserFileInfo::FileChooserFileInfo() : … { … }
FileChooserFileInfo::~FileChooserFileInfo() { … }
void FileChooserFileInfo::set_native_file(
NativeFileInfoPtr native_file) { … }
void FileChooserFileInfo::set_file_system(
FileSystemFileInfoPtr file_system) { … }
void FileChooserFileInfo::DestroyActive() { … }
bool FileChooserFileInfo::Validate(
const void* data,
mojo::internal::ValidationContext* validation_context) { … }
const char FileChooser::Name_[] = …;
FileChooser::IPCStableHashFunction FileChooser::MessageToMethodInfo_(mojo::Message& message) { … }
const char* FileChooser::MessageToMethodName_(mojo::Message& message) { … }
#if !BUILDFLAG(IS_FUCHSIA)
uint32_t FileChooser::OpenFileChooser_Sym::IPCStableHash() { … }
uint32_t FileChooser::EnumerateChosenDirectory_Sym::IPCStableHash() { … }
# endif
class FileChooser_OpenFileChooser_ForwardToCallback
: public mojo::MessageReceiver { … };
class FileChooser_EnumerateChosenDirectory_ForwardToCallback
: public mojo::MessageReceiver { … };
FileChooserProxy::FileChooserProxy(mojo::MessageReceiverWithResponder* receiver)
: … { … }
void FileChooserProxy::OpenFileChooser(
FileChooserParamsPtr in_params, OpenFileChooserCallback callback) { … }
void FileChooserProxy::EnumerateChosenDirectory(
const ::base::FilePath& in_directory_path, EnumerateChosenDirectoryCallback callback) { … }
class FileChooser_OpenFileChooser_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileChooser_OpenFileChooser_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileChooser_OpenFileChooser_ProxyToResponder::Run(
FileChooserResultPtr in_result) { … }
class FileChooser_EnumerateChosenDirectory_ProxyToResponder : public ::mojo::internal::ProxyToResponder { … };
bool FileChooser_EnumerateChosenDirectory_ForwardToCallback::Accept(
mojo::Message* message) { … }
void FileChooser_EnumerateChosenDirectory_ProxyToResponder::Run(
FileChooserResultPtr in_result) { … }
bool FileChooserStubDispatch::Accept(
FileChooser* impl,
mojo::Message* message) { … }
bool FileChooserStubDispatch::AcceptWithResponder(
FileChooser* impl,
mojo::Message* message,
std::unique_ptr<mojo::MessageReceiverWithStatus> responder) { … }
namespace {
}
static const mojo::internal::GenericValidationInfo kFileChooserValidationInfo[] = …;
bool FileChooserRequestValidator::Accept(mojo::Message* message) { … }
bool FileChooserResponseValidator::Accept(mojo::Message* message) { … }
}
namespace mojo {
bool StructTraits<::blink::mojom::blink::FileChooserParams::DataView, ::blink::mojom::blink::FileChooserParamsPtr>::Read(
::blink::mojom::blink::FileChooserParams::DataView input,
::blink::mojom::blink::FileChooserParamsPtr* output) { … }
bool StructTraits<::blink::mojom::blink::NativeFileInfo::DataView, ::blink::mojom::blink::NativeFileInfoPtr>::Read(
::blink::mojom::blink::NativeFileInfo::DataView input,
::blink::mojom::blink::NativeFileInfoPtr* output) { … }
bool StructTraits<::blink::mojom::blink::FileSystemFileInfo::DataView, ::blink::mojom::blink::FileSystemFileInfoPtr>::Read(
::blink::mojom::blink::FileSystemFileInfo::DataView input,
::blink::mojom::blink::FileSystemFileInfoPtr* output) { … }
bool StructTraits<::blink::mojom::blink::FileChooserResult::DataView, ::blink::mojom::blink::FileChooserResultPtr>::Read(
::blink::mojom::blink::FileChooserResult::DataView input,
::blink::mojom::blink::FileChooserResultPtr* output) { … }
bool UnionTraits<::blink::mojom::blink::FileChooserFileInfo::DataView, ::blink::mojom::blink::FileChooserFileInfoPtr>::Read(
::blink::mojom::blink::FileChooserFileInfo::DataView input,
::blink::mojom::blink::FileChooserFileInfoPtr* output) { … }
}
namespace blink::mojom::blink {
void FileChooserInterceptorForTesting::OpenFileChooser(FileChooserParamsPtr params, OpenFileChooserCallback callback) { … }
void FileChooserInterceptorForTesting::EnumerateChosenDirectory(const ::base::FilePath& directory_path, EnumerateChosenDirectoryCallback callback) { … }
FileChooserAsyncWaiter::FileChooserAsyncWaiter(
FileChooser* proxy) : … { … }
FileChooserAsyncWaiter::~FileChooserAsyncWaiter() = default;
void FileChooserAsyncWaiter::OpenFileChooser(
FileChooserParamsPtr params, FileChooserResultPtr* out_result) { … }
FileChooserResultPtr FileChooserAsyncWaiter::OpenFileChooser(
FileChooserParamsPtr params) { … }
void FileChooserAsyncWaiter::EnumerateChosenDirectory(
const ::base::FilePath& directory_path, FileChooserResultPtr* out_result) { … }
FileChooserResultPtr FileChooserAsyncWaiter::EnumerateChosenDirectory(
const ::base::FilePath& directory_path) { … }
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif