chromium/third_party/blink/renderer/bindings/core/v8/async_iterable.h

// Copyright 2023 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_BINDINGS_CORE_V8_ASYNC_ITERABLE_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_ASYNC_ITERABLE_H_

#include "third_party/blink/renderer/bindings/core/v8/iterable.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/platform/bindings/async_iterator_base.h"
#include "third_party/blink/renderer/platform/heap/collection_support/heap_deque.h"

namespace blink {

namespace bindings {

// Implements Web IDL 3.7.10.2. Asynchronous iterator prototype object
// https://webidl.spec.whatwg.org/#es-asynchronous-iterator-prototype-object
// especially about the part of the section independent from key type and
// value type.
class CORE_EXPORT AsyncIterationSourceBase
    : public AsyncIteratorBase::IterationSourceBase {};

template <typename IDLKeyType,
          typename IDLValueType,
          typename KeyType,
          typename ValueType>
class PairAsyncIterationSource : public AsyncIterationSourceBase {};

template <typename IDLValueType, typename ValueType>
class ValueAsyncIterationSource : public AsyncIterationSourceBase {};

}  // namespace bindings

template <typename IDLInterface, typename... InitArgs>
class PairAsyncIterable {};

template <typename IDLInterface, typename... InitArgs>
class ValueAsyncIterable {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_ASYNC_ITERABLE_H_