1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

LibWeb: Abstract the LibProtocol WebSockets connection

Much like the ImageDecoder change, this moves the underlying connection
of the Web::WebSockets class from LibWeb to LibWebView, removing the
need for LibProtocol in LibWeb for this specific use-case.
This commit is contained in:
DexesTTP 2022-04-30 11:26:21 +02:00 committed by Andreas Kling
parent 2198091bbc
commit 2a359695c6
6 changed files with 255 additions and 54 deletions

View file

@ -10,7 +10,9 @@
#include <LibIPC/SingleServer.h>
#include <LibMain/Main.h>
#include <LibWeb/ImageDecoding.h>
#include <LibWeb/WebSockets/WebSocket.h>
#include <LibWebView/ImageDecoderClientAdapter.h>
#include <LibWebView/WebSocketClientAdapter.h>
#include <WebContent/ConnectionFromClient.h>
ErrorOr<int> serenity_main(Main::Arguments)
@ -25,6 +27,7 @@ ErrorOr<int> serenity_main(Main::Arguments)
TRY(Core::System::unveil(nullptr, nullptr));
Web::ImageDecoding::Decoder::initialize(WebView::ImageDecoderClientAdapter::create());
Web::WebSockets::WebSocketClientManager::initialize(TRY(WebView::WebSocketClientManagerAdapter::try_create()));
auto client = TRY(IPC::take_over_accepted_client_from_system_server<WebContent::ConnectionFromClient>());
return event_loop.exec();