chromium/third_party/blink/renderer/core/streams/writable_stream_default_writer.cc

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

#include "third_party/blink/renderer/core/streams/writable_stream_default_writer.h"

#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/core/streams/miscellaneous_operations.h"
#include "third_party/blink/renderer/core/streams/writable_stream.h"
#include "third_party/blink/renderer/core/streams/writable_stream_default_controller.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/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

namespace {

String CreateWriterLockReleasedMessage(const char* verbed) {}

v8::Local<v8::Value> CreateWriterLockReleasedException(v8::Isolate* isolate,
                                                       const char* verbed) {}

}  // namespace

WritableStreamDefaultWriter* WritableStreamDefaultWriter::Create(
    ScriptState* script_state,
    WritableStream* stream,
    ExceptionState& exception_state) {}

// TODO(ricea): Does using the ScriptState supplied by IDL result in promises
// being created with the correct global?
WritableStreamDefaultWriter::WritableStreamDefaultWriter(
    ScriptState* script_state,
    WritableStream* stream,
    ExceptionState& exception_state)
    //  3. Set this.[[ownerWritableStream]] to stream.
    :{}

WritableStreamDefaultWriter::~WritableStreamDefaultWriter() = default;

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::closed(
    ScriptState* script_state) const {}

ScriptValue WritableStreamDefaultWriter::desiredSize(
    ScriptState* script_state,
    ExceptionState& exception_state) const {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::ready(
    ScriptState* script_state) const {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::abort(
    ScriptState* script_state,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::abort(
    ScriptState* script_state,
    ScriptValue reason,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::close(
    ScriptState* script_state,
    ExceptionState& exception_state) {}

void WritableStreamDefaultWriter::releaseLock(ScriptState* script_state) {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::write(
    ScriptState* script_state,
    ExceptionState& exception_state) {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::write(
    ScriptState* script_state,
    ScriptValue chunk,
    ExceptionState& exception_state) {}

void WritableStreamDefaultWriter::EnsureReadyPromiseRejected(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer,
    v8::Local<v8::Value> error) {}

ScriptPromise<IDLUndefined>
WritableStreamDefaultWriter::CloseWithErrorPropagation(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer) {}

void WritableStreamDefaultWriter::Release(ScriptState* script_state,
                                          WritableStreamDefaultWriter* writer) {}

ScriptPromiseResolver<IDLUndefined>* WritableStreamDefaultWriter::Write(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer,
    v8::Local<v8::Value> chunk,
    ExceptionState& exception_state) {}

std::optional<double> WritableStreamDefaultWriter::GetDesiredSizeInternal()
    const {}

void WritableStreamDefaultWriter::ResetReadyPromise(ScriptState* script_state) {}

void WritableStreamDefaultWriter::Trace(Visitor* visitor) const {}

// Writable Stream Writer Abstract Operations

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::Abort(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer,
    v8::Local<v8::Value> reason) {}

ScriptPromise<IDLUndefined> WritableStreamDefaultWriter::Close(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer) {}

void WritableStreamDefaultWriter::EnsureClosedPromiseRejected(
    ScriptState* script_state,
    WritableStreamDefaultWriter* writer,
    v8::Local<v8::Value> error) {}

v8::Local<v8::Value> WritableStreamDefaultWriter::GetDesiredSize(
    v8::Isolate* isolate,
    const WritableStreamDefaultWriter* writer) {}

}  // namespace blink