1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:17:34 +00:00

LibProtocol+LibWebView: Allow callers provide their own RequestClient

This will be used by Ladybird when it spawns its RequestServer in a
Lagom-specific way rather than using SystemServer to do it.
This commit is contained in:
Andrew Kaster 2023-08-01 14:41:13 -06:00 committed by Andreas Kling
parent 28d3d3c9fc
commit ec3267e002
3 changed files with 11 additions and 5 deletions

View file

@ -36,6 +36,9 @@ private:
class RequestServerAdapter : public Web::ResourceLoaderConnector {
public:
explicit RequestServerAdapter(NonnullRefPtr<Protocol::RequestClient> protocol_client);
static ErrorOr<NonnullRefPtr<RequestServerAdapter>> try_create(NonnullRefPtr<Protocol::RequestClient>);
static ErrorOr<NonnullRefPtr<RequestServerAdapter>> try_create();
virtual ~RequestServerAdapter() override;
@ -45,8 +48,6 @@ public:
virtual RefPtr<Web::ResourceLoaderConnectorRequest> start_request(DeprecatedString const& method, URL const&, HashMap<DeprecatedString, DeprecatedString> const& request_headers = {}, ReadonlyBytes request_body = {}, Core::ProxyData const& = {}) override;
private:
RequestServerAdapter(NonnullRefPtr<Protocol::RequestClient> protocol_client);
RefPtr<Protocol::RequestClient> m_protocol_client;
};