mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:57:35 +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:
parent
28d3d3c9fc
commit
ec3267e002
3 changed files with 11 additions and 5 deletions
|
@ -68,10 +68,15 @@ void RequestServerRequestAdapter::stream_into(Stream& stream)
|
|||
m_request->stream_into(stream);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<RequestServerAdapter>> RequestServerAdapter::try_create(NonnullRefPtr<Protocol::RequestClient> protocol_client)
|
||||
{
|
||||
return try_make_ref_counted<RequestServerAdapter>(move(protocol_client));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<RequestServerAdapter>> RequestServerAdapter::try_create()
|
||||
{
|
||||
auto protocol_client = TRY(Protocol::RequestClient::try_create());
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) RequestServerAdapter(move(protocol_client)));
|
||||
return try_make_ref_counted<RequestServerAdapter>(move(protocol_client));
|
||||
}
|
||||
|
||||
RequestServerAdapter::RequestServerAdapter(NonnullRefPtr<Protocol::RequestClient> protocol_client)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue