#include "third_party/blink/renderer/modules/filesystem/file_system_callbacks.h"
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/fileapi/file.h"
#include "third_party/blink/renderer/core/fileapi/file_error.h"
#include "third_party/blink/renderer/modules/filesystem/directory_entry.h"
#include "third_party/blink/renderer/modules/filesystem/directory_reader.h"
#include "third_party/blink/renderer/modules/filesystem/dom_file_path.h"
#include "third_party/blink/renderer/modules/filesystem/dom_file_system.h"
#include "third_party/blink/renderer/modules/filesystem/dom_file_system_base.h"
#include "third_party/blink/renderer/modules/filesystem/entry.h"
#include "third_party/blink/renderer/modules/filesystem/file_entry.h"
#include "third_party/blink/renderer/modules/filesystem/file_writer.h"
#include "third_party/blink/renderer/modules/filesystem/metadata.h"
#include "third_party/blink/renderer/platform/file_metadata.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
FileSystemCallbacksBase::FileSystemCallbacksBase(DOMFileSystemBase* file_system,
ExecutionContext* context)
: … { … }
FileSystemCallbacksBase::~FileSystemCallbacksBase() { … }
EntryCallbacks::EntryCallbacks(SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context,
DOMFileSystemBase* file_system,
const String& expected_path,
bool is_directory)
: … { … }
void EntryCallbacks::DidSucceed() { … }
void EntryCallbacks::DidFail(base::File::Error error) { … }
EntriesCallbacks::EntriesCallbacks(const SuccessCallback& success_callback,
ErrorCallback error_callback,
ExecutionContext* context,
DirectoryReaderBase* directory_reader,
const String& base_path)
: … { … }
void EntriesCallbacks::DidReadDirectoryEntry(const String& name,
bool is_directory) { … }
void EntriesCallbacks::DidReadDirectoryEntries(bool has_more) { … }
void EntriesCallbacks::DidFail(base::File::Error error) { … }
FileSystemCallbacks::FileSystemCallbacks(SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context,
mojom::blink::FileSystemType type)
: … { … }
void FileSystemCallbacks::DidOpenFileSystem(const String& name,
const KURL& root_url) { … }
void FileSystemCallbacks::DidFail(base::File::Error error) { … }
ResolveURICallbacks::ResolveURICallbacks(SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context)
: … { … }
void ResolveURICallbacks::DidResolveURL(const String& name,
const KURL& root_url,
mojom::blink::FileSystemType type,
const String& file_path,
bool is_directory) { … }
void ResolveURICallbacks::DidFail(base::File::Error error) { … }
MetadataCallbacks::MetadataCallbacks(SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context,
DOMFileSystemBase* file_system)
: … { … }
void MetadataCallbacks::DidReadMetadata(const FileMetadata& metadata) { … }
void MetadataCallbacks::DidFail(base::File::Error error) { … }
FileWriterCallbacks::FileWriterCallbacks(FileWriterBase* file_writer,
SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context)
: … { … }
void FileWriterCallbacks::DidCreateFileWriter(const KURL& path,
int64_t length) { … }
void FileWriterCallbacks::DidFail(base::File::Error error) { … }
SnapshotFileCallback::SnapshotFileCallback(DOMFileSystemBase* filesystem,
const String& name,
const KURL& url,
SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context)
: … { … }
void SnapshotFileCallback::DidCreateSnapshotFile(const FileMetadata& metadata) { … }
void SnapshotFileCallback::DidFail(base::File::Error error) { … }
VoidCallbacks::VoidCallbacks(SuccessCallback success_callback,
ErrorCallback error_callback,
ExecutionContext* context,
DOMFileSystemBase* file_system)
: … { … }
void VoidCallbacks::DidSucceed() { … }
void VoidCallbacks::DidFail(base::File::Error error) { … }
}