mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWebView+ImageDecoder+RequestServer+WebContent: Add init_transport
This commit is contained in:
parent
652af318db
commit
3e46cb9067
Notes:
github-actions[bot]
2025-02-13 11:46:18 +00:00
Author: https://github.com/stasoid
Commit: 3e46cb9067
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3179
Reviewed-by: https://github.com/ADKaster ✅
14 changed files with 52 additions and 0 deletions
|
@ -280,6 +280,10 @@ ErrorOr<void> initialize_resource_loader(GC::Heap& heap, int request_server_sock
|
|||
TRY(socket->set_blocking(true));
|
||||
|
||||
auto request_client = TRY(try_make_ref_counted<Requests::RequestClient>(IPC::Transport(move(socket))));
|
||||
#ifdef AK_OS_WINDOWS
|
||||
auto response = request_client->send_sync<Messages::RequestServer::InitTransport>(Core::System::getpid());
|
||||
request_client->transport().set_peer_pid(response->peer_pid());
|
||||
#endif
|
||||
Web::ResourceLoader::initialize(heap, move(request_client));
|
||||
|
||||
return {};
|
||||
|
@ -292,6 +296,10 @@ ErrorOr<void> initialize_image_decoder(int image_decoder_socket)
|
|||
TRY(socket->set_blocking(true));
|
||||
|
||||
auto new_client = TRY(try_make_ref_counted<ImageDecoderClient::Client>(IPC::Transport(move(socket))));
|
||||
#ifdef AK_OS_WINDOWS
|
||||
auto response = new_client->send_sync<Messages::ImageDecoderServer::InitTransport>(Core::System::getpid());
|
||||
new_client->transport().set_peer_pid(response->peer_pid());
|
||||
#endif
|
||||
|
||||
Web::Platform::ImageCodecPlugin::install(*new WebView::ImageCodecPlugin(move(new_client)));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue