mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 15:58:56 +00:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89
Commit: 93712b24bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256
Reviewed-by: https://github.com/sideshowbarker
4547 changed files with 104 additions and 113 deletions
50
Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h
Normal file
50
Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
|
||||
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/Streams/ReadableByteStreamController.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::Streams {
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestreambyobrequest
|
||||
class ReadableStreamBYOBRequest : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(ReadableStreamBYOBRequest, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(ReadableStreamBYOBRequest);
|
||||
|
||||
public:
|
||||
virtual ~ReadableStreamBYOBRequest() override = default;
|
||||
|
||||
JS::GCPtr<WebIDL::ArrayBufferView> view();
|
||||
|
||||
void set_controller(JS::GCPtr<ReadableByteStreamController> value) { m_controller = value; }
|
||||
|
||||
void set_view(JS::GCPtr<WebIDL::ArrayBufferView> value) { m_view = value; }
|
||||
|
||||
WebIDL::ExceptionOr<void> respond(WebIDL::UnsignedLongLong bytes_written);
|
||||
WebIDL::ExceptionOr<void> respond_with_new_view(JS::Handle<WebIDL::ArrayBufferView> const& view);
|
||||
|
||||
private:
|
||||
explicit ReadableStreamBYOBRequest(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestreambyobrequest-controller
|
||||
// The parent ReadableByteStreamController instance
|
||||
JS::GCPtr<ReadableByteStreamController> m_controller;
|
||||
|
||||
// https://streams.spec.whatwg.org/#readablestreambyobrequest-view
|
||||
// A typed array representing the destination region to which the controller can write generated data, or null after the BYOB request has been invalidated.
|
||||
JS::GCPtr<WebIDL::ArrayBufferView> m_view;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue