mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibWebView+LibProtocol: Allow app to pass custom WebSocketClients
This commit is contained in:
committed by
Andreas Kling
parent
a1e5a6ac40
commit
dd694215bc
@@ -107,6 +107,11 @@ void WebSocketClientSocketAdapter::close(u16 code, DeprecatedString reason)
|
||||
m_websocket->close(code, reason);
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebSocketClientManagerAdapter>> WebSocketClientManagerAdapter::try_create(NonnullRefPtr<Protocol::WebSocketClient> websocket_client)
|
||||
{
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) WebSocketClientManagerAdapter(move(websocket_client)));
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<WebSocketClientManagerAdapter>> WebSocketClientManagerAdapter::try_create()
|
||||
{
|
||||
auto websocket_client = TRY(Protocol::WebSocketClient::try_create());
|
||||
|
||||
Reference in New Issue
Block a user