Truly independent web browser
/*
* Copyright (c) 2026-present, the Ladybird developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Badge.h>
#include <AK/NonnullOwnPtr.h>
#include <AK/Optional.h>
#include <LibWeb/Fetch/Engine/BodyIntent.h>
#include <LibWeb/Fetch/Engine/EngineEventSink.h>
#include <LibWeb/Fetch/Engine/Ids.h>
#include <LibWebCommon/FileAPI/SerializedBlobURLEntry.h>
namespace Web::Fetch::Infrastructure {
class FetchParams;
}
namespace Web::Fetch::Engine {
struct StartFetchInput {
StartFetchInput(Badge<Infrastructure::FetchParams>, FetchId fetch_id, BodyIntent body_intent, Optional<FileAPI::SerializedBlobURLEntry> blob_url_entry, NonnullOwnPtr<EngineEventSink> event_sink)
: fetch_id(fetch_id)
, body_intent(body_intent)
, blob_url_entry(move(blob_url_entry))
, event_sink(move(event_sink))
{
}
// An agent's fetch ids rise in the order it posts their starts.
FetchId fetch_id;
BodyIntent body_intent;
// Resolved by the agent that starts the fetch, at fetch start.
Optional<FileAPI::SerializedBlobURLEntry> blob_url_entry;
NonnullOwnPtr<EngineEventSink> event_sink;
};
}