#include "third_party/blink/renderer/core/streams/readable_stream_default_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/core/streams/miscellaneous_operations.h"
#include "third_party/blink/renderer/core/streams/promise_handler.h"
#include "third_party/blink/renderer/core/streams/queue_with_sizes.h"
#include "third_party/blink/renderer/core/streams/read_request.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"
#include "third_party/blink/renderer/core/streams/readable_stream_default_reader.h"
#include "third_party/blink/renderer/core/streams/stream_algorithms.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/visitor.h"
namespace blink {
ReadableStreamDefaultController::ReadableStreamDefaultController(
ScriptState* script_state)
: … { … }
void ReadableStreamDefaultController::close(ScriptState* script_state,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::enqueue(ScriptState* script_state,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::enqueue(ScriptState* script_state,
ScriptValue chunk,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::error(ScriptState* script_state) { … }
void ReadableStreamDefaultController::error(ScriptState* script_state,
ScriptValue e) { … }
void ReadableStreamDefaultController::Close(
ScriptState* script_state,
ReadableStreamDefaultController* controller) { … }
void ReadableStreamDefaultController::Enqueue(
ScriptState* script_state,
ReadableStreamDefaultController* controller,
v8::Local<v8::Value> chunk,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::Error(
ScriptState* script_state,
ReadableStreamDefaultController* controller,
v8::Local<v8::Value> e) { … }
std::optional<double> ReadableStreamDefaultController::GetDesiredSize() const { … }
bool ReadableStreamDefaultController::CanCloseOrEnqueue(
const ReadableStreamDefaultController* controller) { … }
bool ReadableStreamDefaultController::HasBackpressure(
const ReadableStreamDefaultController* controller) { … }
const char* ReadableStreamDefaultController::EnqueueExceptionMessage(
const ReadableStreamDefaultController* controller) { … }
void ReadableStreamDefaultController::Trace(Visitor* visitor) const { … }
v8::Local<v8::Promise> ReadableStreamDefaultController::CancelSteps(
ScriptState* script_state,
v8::Local<v8::Value> reason) { … }
void ReadableStreamDefaultController::PullSteps(
ScriptState* script_state,
ReadRequest* read_request,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::ReleaseSteps() { … }
void ReadableStreamDefaultController::CallPullIfNeeded(
ScriptState* script_state,
ReadableStreamDefaultController* controller) { … }
bool ReadableStreamDefaultController::ShouldCallPull(
const ReadableStreamDefaultController* controller) { … }
void ReadableStreamDefaultController::ClearAlgorithms(
ReadableStreamDefaultController* controller) { … }
void ReadableStreamDefaultController::SetUp(
ScriptState* script_state,
ReadableStream* stream,
ReadableStreamDefaultController* controller,
StreamStartAlgorithm* start_algorithm,
StreamAlgorithm* pull_algorithm,
StreamAlgorithm* cancel_algorithm,
double high_water_mark,
StrategySizeAlgorithm* size_algorithm,
ExceptionState& exception_state) { … }
void ReadableStreamDefaultController::SetUpFromUnderlyingSource(
ScriptState* script_state,
ReadableStream* stream,
v8::Local<v8::Object> underlying_source,
double high_water_mark,
StrategySizeAlgorithm* size_algorithm,
ExceptionState& exception_state) { … }
}