mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 15:43:20 +00:00

Allows formulas to update on Google Sheets, which uses a Worker to update them and makes cookie authenticated requests, which was failing before this commit. This has the limitation that it has to proxy through the WebContent process, but that's how the current infrastructure is, which is outside the scope of this commit.
40 lines
910 B
C++
40 lines
910 B
C++
/*
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibCore/System.h>
|
|
#include <LibWeb/Worker/WebWorkerClient.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
void WebWorkerClient::die()
|
|
{
|
|
// FIXME: Notify WorkerAgent that the worker is dead
|
|
}
|
|
|
|
void WebWorkerClient::did_close_worker()
|
|
{
|
|
if (on_worker_close)
|
|
on_worker_close();
|
|
}
|
|
|
|
Messages::WebWorkerClient::DidRequestCookieResponse WebWorkerClient::did_request_cookie(URL::URL url, Cookie::Source source)
|
|
{
|
|
if (on_request_cookie)
|
|
return on_request_cookie(url, source);
|
|
return String {};
|
|
}
|
|
|
|
WebWorkerClient::WebWorkerClient(NonnullOwnPtr<IPC::Transport> transport)
|
|
: IPC::ConnectionToServer<WebWorkerClientEndpoint, WebWorkerServerEndpoint>(*this, move(transport))
|
|
{
|
|
}
|
|
|
|
IPC::File WebWorkerClient::clone_transport()
|
|
{
|
|
return MUST(m_transport->clone_for_transfer());
|
|
}
|
|
|
|
}
|