mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
5f8d852dae
Currently, if we want to add a new e.g. WebContent command line option, we have to add it to all of Qt, AppKit, and headless-browser. (Or worse, we only add it to one of these, and we have feature disparity). To prevent this, this moves command line flags to WebView::Application. The flags are assigned to ChromeOptions and WebContentOptions structs. Each chrome can still add its platform-specific options; for example, the Qt chrome has a flag to enable Qt networking. There should be no behavior change here, other than that AppKit will now support command line flags that were previously only supported by Qt.
30 lines
1.3 KiB
C
30 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#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 <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,
|
|
IPC::File image_decoder_socket,
|
|
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);
|
|
|
|
ErrorOr<IPC::File> connect_new_request_server_client(Protocol::RequestClient&);
|
|
ErrorOr<IPC::File> connect_new_image_decoder_client(ImageDecoderClient::Client&);
|