HelperProcess.h 1.3 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <AK/Error.h>
  8. #include <AK/Optional.h>
  9. #include <AK/Span.h>
  10. #include <AK/StringView.h>
  11. #include <LibImageDecoderClient/Client.h>
  12. #include <LibRequests/RequestClient.h>
  13. #include <LibWeb/Worker/WebWorkerClient.h>
  14. #include <LibWebView/ViewImplementation.h>
  15. #include <LibWebView/WebContentClient.h>
  16. ErrorOr<NonnullRefPtr<WebView::WebContentClient>> launch_web_content_process(
  17. WebView::ViewImplementation& view,
  18. ReadonlySpan<ByteString> candidate_web_content_paths,
  19. IPC::File image_decoder_socket,
  20. Optional<IPC::File> request_server_socket = {});
  21. ErrorOr<NonnullRefPtr<ImageDecoderClient::Client>> launch_image_decoder_process(ReadonlySpan<ByteString> candidate_image_decoder_paths);
  22. ErrorOr<NonnullRefPtr<Web::HTML::WebWorkerClient>> launch_web_worker_process(ReadonlySpan<ByteString> candidate_web_worker_paths, NonnullRefPtr<Requests::RequestClient>);
  23. ErrorOr<NonnullRefPtr<Requests::RequestClient>> launch_request_server_process(ReadonlySpan<ByteString> candidate_request_server_paths, StringView serenity_resource_root);
  24. ErrorOr<IPC::File> connect_new_request_server_client(Requests::RequestClient&);
  25. ErrorOr<IPC::File> connect_new_image_decoder_client(ImageDecoderClient::Client&);