#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.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-import-headers.h"
#include "third_party/blink/public/mojom/choosers/file_chooser.mojom-test-utils.h"
namespace blink::mojom {
FileChooserParams::FileChooserParams()
: … { … }
FileChooserParams::FileChooserParams(
FileChooserParams::Mode mode_in,
const ::std::u16string& title_in,
const ::base::FilePath& default_file_name_in,
std::vector<::base::FilePath> selected_files_in,
std::vector<::std::u16string> accept_types_in,
bool need_local_path_in,
bool use_media_capture_in,
const ::GURL& 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 ::std::u16string& 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 ::GURL& 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(
std::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::FileChooserParams::DataView, ::blink::mojom::FileChooserParamsPtr>::Read(
::blink::mojom::FileChooserParams::DataView input,
::blink::mojom::FileChooserParamsPtr* output) { … }
bool StructTraits<::blink::mojom::NativeFileInfo::DataView, ::blink::mojom::NativeFileInfoPtr>::Read(
::blink::mojom::NativeFileInfo::DataView input,
::blink::mojom::NativeFileInfoPtr* output) { … }
bool StructTraits<::blink::mojom::FileSystemFileInfo::DataView, ::blink::mojom::FileSystemFileInfoPtr>::Read(
::blink::mojom::FileSystemFileInfo::DataView input,
::blink::mojom::FileSystemFileInfoPtr* output) { … }
bool StructTraits<::blink::mojom::FileChooserResult::DataView, ::blink::mojom::FileChooserResultPtr>::Read(
::blink::mojom::FileChooserResult::DataView input,
::blink::mojom::FileChooserResultPtr* output) { … }
bool UnionTraits<::blink::mojom::FileChooserFileInfo::DataView, ::blink::mojom::FileChooserFileInfoPtr>::Read(
::blink::mojom::FileChooserFileInfo::DataView input,
::blink::mojom::FileChooserFileInfoPtr* output) { … }
}
namespace blink::mojom {
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