serenity/Ladybird/HelperProcess.h
Tim Ledbetter 27f724b435 WebWorker: Allow the WebWorker process to optionally use Qt networking
This change adds a `--use-lagom-networking` flag to the WebWorker
process. Qt networking is used if this flag isn't passed. The flag is
passed the UI launches the WebWorker process unless the Qt chrome is
being run with the `--enable-qt-networking` flag.

(cherry picked from commit 886714632759c1e2feeb636388975f0e3b515839;
amended Qt/main.cpp to resolve minor conflict due to serenity not having
LadybirdBrowser/ladybird#284 LadybirdBrowser/ladybird#45, and
WebWorker/CMakeLists.txt due to serenity still having
`SERENITY_SOURCE_DIR` instead of `LADYBIRD_SOURCE_DIR` --
LadybirdBrowser/ladybird#17)
2024-11-15 19:07:17 -05:00

32 lines
1.4 KiB
C

/*
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Types.h"
#include <AK/Error.h>
#include <AK/Optional.h>
#include <AK/Span.h>
#include <AK/StringView.h>
#include <LibImageDecoderClient/Client.h>
#include <LibProtocol/RequestClient.h>
#include <LibSQL/SQLClient.h>
#include <LibWeb/Worker/WebWorkerClient.h>
#include <LibWebView/ViewImplementation.h>
#include <LibWebView/WebContentClient.h>
ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(
WebView::ViewImplementation& view,
ReadonlySpan<ByteString> candidate_web_content_paths,
Ladybird::WebContentOptions const&,
Optional<IPC::File> request_server_socket = {});
ErrorOr<NonnullRefPtr<ImageDecoderClient::Client>> launch_image_decoder_process(ReadonlySpan<ByteString> candidate_image_decoder_paths);
ErrorOr<NonnullRefPtr<Web::HTML::WebWorkerClient>> launch_web_worker_process(ReadonlySpan<ByteString> candidate_web_worker_paths, RefPtr<Protocol::RequestClient>);
ErrorOr<NonnullRefPtr<Protocol::RequestClient>> launch_request_server_process(ReadonlySpan<ByteString> candidate_request_server_paths, StringView serenity_resource_root, Vector<ByteString> const& certificates);
ErrorOr<NonnullRefPtr<SQL::SQLClient>> launch_sql_server_process(ReadonlySpan<ByteString> candidate_sql_server_paths);
ErrorOr<IPC::File> connect_new_request_server_client(Protocol::RequestClient&);