mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +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
44
Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h
Normal file
44
Libraries/LibWeb/Fetch/Infrastructure/FetchRecord.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Mohamed amine Bounya <mobounya@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibWeb/Fetch/Infrastructure/FetchController.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Requests.h>
|
||||
|
||||
namespace Web::Fetch::Infrastructure {
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-fetch-record
|
||||
class FetchRecord : public JS::Cell {
|
||||
JS_CELL(FetchRecord, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(FetchRecord);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FetchRecord> create(JS::VM&, JS::NonnullGCPtr<Infrastructure::Request>);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FetchRecord> create(JS::VM&, JS::NonnullGCPtr<Infrastructure::Request>, JS::GCPtr<FetchController>);
|
||||
|
||||
[[nodiscard]] JS::NonnullGCPtr<Infrastructure::Request> request() const { return m_request; }
|
||||
void set_request(JS::NonnullGCPtr<Infrastructure::Request> request) { m_request = request; }
|
||||
|
||||
[[nodiscard]] JS::GCPtr<FetchController> fetch_controller() const { return m_fetch_controller; }
|
||||
void set_fetch_controller(JS::GCPtr<FetchController> fetch_controller) { m_fetch_controller = fetch_controller; }
|
||||
|
||||
private:
|
||||
explicit FetchRecord(JS::NonnullGCPtr<Infrastructure::Request>);
|
||||
FetchRecord(JS::NonnullGCPtr<Infrastructure::Request>, JS::GCPtr<FetchController>);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-request
|
||||
// A fetch record has an associated request (a request)
|
||||
JS::NonnullGCPtr<Infrastructure::Request> m_request;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#fetch-controller
|
||||
// A fetch record has an associated controller (a fetch controller or null)
|
||||
JS::GCPtr<FetchController> m_fetch_controller { nullptr };
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue