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

// Copyright 2021 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_FILE_SYSTEM_ACCESS_FILE_DELEGATE_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_FILE_DELEGATE_H_

#include "base/files/file_error_or.h"
#include "base/sequence_checker.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_file_handle.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"

namespace blink {

// File object providing a common interface for file operations for an
// AccessHandle. These methods closely map to base::File equivalents. The
// implementation of the FileDelegate will depend on whether the renderer is in
// incognito. All methods are synchronous.
// A FileDelegate may get accessed by multiple threads, even though the caller
// has to make sure that there is no concurrent access. This means that at any
// point in time there is exactly one thread that may access the FileDelegate.
class FileSystemAccessFileDelegate
    : public GarbageCollected<FileSystemAccessFileDelegate> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_FILE_DELEGATE_H_