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:
parent
2198091bbc
commit
2a359695c6
6 changed files with 255 additions and 54 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue