Skip to content

Truly independent web browser

2.6 KB
Raw Blame
#include <AK/Utf16String.h>
#include <LibHTTP/Cache/DiskCacheSettings.h>
#include <LibHTTP/Proxy.h>
#include <LibIPC/TransportHandle.h>
#include <RequestServer/IsPrivate.h>
#include <RequestServer/RequestType.h>
#include <RequestServer/SiteBinding.h>

endpoint RequestServerControl
{

    // The client IDs let the UI process tell whose cookies a client may use.
    connect_new_client(::RequestServer::IsPrivate is_private, ::RequestServer::SiteBinding site_binding) => (IPC::TransportHandle handle, int client_id)
    connect_new_clients(size_t count, ::RequestServer::IsPrivate is_private, ::RequestServer::SiteBinding site_binding) => (Vector<IPC::TransportHandle> handles, Vector<int> client_ids)

    // Lets a bound client make requests for documents of frame_site under a top-level document of top_level_site. This
    // is synchronous, so the binding is in place before the UI process lets the client's process host such a document.
    bind_client_to_site(int client_id, Utf16String top_level_site, Optional<Utf16String> frame_site) => ()

    // A bound client may adopt a leased request once per designation.
    designate_request_adopter(u64 designation_id, int source_client_id, u64 source_request_id, int adopter_client_id) =|

    set_disk_cache_settings(HTTP::DiskCacheSettings disk_cache_settings) =|

    // use_tls: enable DNS over TLS
    set_dns_server(ByteString host_or_address, u16 port, bool use_tls, bool validate_dnssec_locally) =|
    set_use_system_dns() =|

    set_proxy_configuration(HTTP::ProxyConfiguration proxy_configuration) =|

    // Synchronous so the exception applies before the UI process reloads.
    trust_certificate(ByteString host, u16 port, ByteString fingerprint) => ()

    set_performance_monitor_enabled(bool enabled) =|

    estimate_cache_size_accessed_since(u64 cache_size_estimation_id, UnixDateTime since) =|
    remove_cache_entries_accessed_since(u64 clear_cache_request_id, UnixDateTime since) =|

    // Supports the UI process's least-recently-used eviction across all RequestServer disk caches.
    retrieve_cache_access_profile(u64 access_profile_request_id, AK::Duration granularity) =|
    remove_cache_entries_accessed_before(UnixDateTime before) =|

    retrieved_http_cookie(int client_id, u64 request_id, ::RequestServer::RequestType request_type, u64 cookie_request_id, String cookie) =|
    stored_response_cookies_and_hsts_policy(int client_id, u64 request_id, u64 store_request_id) =|
    // The addresses that the system resolver found for a name, or nothing if the lookup failed.
    resolved_host_with_system_resolver(u64 resolution_id, Optional<Vector<ByteString>> addresses) =|
}