chromium/third_party/blink/renderer/modules/file_system_access/bucket_file_system_builder.h

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_BUCKET_FILE_SYSTEM_BUILDER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_BUCKET_FILE_SYSTEM_BUILDER_H_

#include <deque>

#include "third_party/blink/public/mojom/file_system_access/file_system_access_error.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/inspector/protocol/file_system.h"
#include "third_party/blink/renderer/modules/file_system_access/file_system_directory_handle.h"
#include "third_party/blink/renderer/modules/file_system_access/file_system_file_handle.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"

namespace blink {

// This callback is used to pass the constructed
// `protocol::FileSystem::Directory` from a `FileSystemDirectoryHandle`.
DirectoryCallback;

// This class receives a directory or file handle and builds a corresponding
// `protocol::FileSystem::Directory` or `protocol::FileSystem::File` object.
// This class is instantiated by the BuildDirectory method.
class MODULES_EXPORT BucketFileSystemBuilder final
    : public GarbageCollected<BucketFileSystemBuilder>,
      public ExecutionContextClient,
      public mojom::blink::FileSystemAccessDirectoryEntriesListener {};
}  // namespace blink
#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_BUCKET_FILE_SYSTEM_BUILDER_H_