mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWebView+ImageDecoder+RequestServer+WebContent: Add init_transport
This commit is contained in:
@@ -53,6 +53,11 @@ static ErrorOr<NonnullRefPtr<ClientType>> launch_server_process(
|
||||
if constexpr (requires { client->set_pid(pid_t {}); })
|
||||
client->set_pid(process.pid());
|
||||
|
||||
if constexpr (requires { client->transport().set_peer_pid(0); } && !IsSame<ClientType, Web::HTML::WebWorkerClient>) {
|
||||
auto response = client->template send_sync<typename ClientType::InitTransport>(Core::System::getpid());
|
||||
client->transport().set_peer_pid(response->peer_pid());
|
||||
}
|
||||
|
||||
WebView::Application::the().add_child_process(move(process));
|
||||
|
||||
if (chrome_options.profile_helper_process == process_type) {
|
||||
|
||||
@@ -29,6 +29,8 @@ class WebContentClient final
|
||||
C_OBJECT_ABSTRACT(WebContentClient);
|
||||
|
||||
public:
|
||||
using InitTransport = Messages::WebContentServer::InitTransport;
|
||||
|
||||
static Optional<ViewImplementation&> view_for_pid_and_page_id(pid_t pid, u64 page_id);
|
||||
|
||||
template<CallableAs<IterationDecision, WebContentClient&> Callback>
|
||||
|
||||
Reference in New Issue
Block a user