1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:07:44 +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

@ -21,6 +21,8 @@ class RequestClient final
IPC_CLIENT_CONNECTION(RequestClient, "/tmp/session/%sid/portal/request"sv)
public:
explicit RequestClient(NonnullOwnPtr<Core::LocalSocket>);
template<typename RequestHashMapTraits = Traits<DeprecatedString>>
RefPtr<Request> start_request(DeprecatedString const& method, URL const&, HashMap<DeprecatedString, DeprecatedString, RequestHashMapTraits> const& request_headers = {}, ReadonlyBytes request_body = {}, Core::ProxyData const& = {});
@ -30,8 +32,6 @@ public:
bool set_certificate(Badge<Request>, Request&, DeprecatedString, DeprecatedString);
private:
RequestClient(NonnullOwnPtr<Core::LocalSocket>);
virtual void request_progress(i32, Optional<u64> const&, u64) override;
virtual void request_finished(i32, bool, u64) override;
virtual void certificate_requested(i32) override;