chromium/third_party/blink/renderer/modules/file_system_access/file_system_access_capacity_tracker.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_CAPACITY_TRACKER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_CAPACITY_TRACKER_H_

#include "base/functional/callback.h"
#include "base/types/pass_key.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/mojom/file_system_access/file_system_access_file_modification_host.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"

namespace blink {

class ExecutionContext;
class FileSystemAccessRegularFileDelegate;

// Tracks the capacity available to a (single)
// FileSystemAccessRegularFileDelegate.
//
// This is performed by keeping track of the file's size and the capacity for
// growth received by the browser process. If needed, additional capacity for
// growth is requested from the browser process.
class FileSystemAccessCapacityTracker final
    : public GarbageCollected<FileSystemAccessCapacityTracker> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_FILE_SYSTEM_ACCESS_FILE_SYSTEM_ACCESS_CAPACITY_TRACKER_H_