mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-18 06:00:27 +00:00
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
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.
37 lines
987 B
C++
37 lines
987 B
C++
/*
|
|
* Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibIPC/ConnectionToServer.h>
|
|
#include <LibWeb/Cookie/Cookie.h>
|
|
#include <LibWeb/Export.h>
|
|
#include <LibWeb/Worker/WebWorkerClientEndpoint.h>
|
|
#include <LibWeb/Worker/WebWorkerServerEndpoint.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
class WEB_API WebWorkerClient final
|
|
: public IPC::ConnectionToServer<WebWorkerClientEndpoint, WebWorkerServerEndpoint>
|
|
, public WebWorkerClientEndpoint {
|
|
C_OBJECT_ABSTRACT(WebWorkerClient);
|
|
|
|
public:
|
|
explicit WebWorkerClient(NonnullOwnPtr<IPC::Transport>);
|
|
|
|
virtual void did_close_worker() override;
|
|
virtual Messages::WebWorkerClient::DidRequestCookieResponse did_request_cookie(URL::URL, Cookie::Source) override;
|
|
|
|
Function<void()> on_worker_close;
|
|
Function<String(URL::URL const&, Cookie::Source)> on_request_cookie;
|
|
|
|
IPC::File clone_transport();
|
|
|
|
private:
|
|
virtual void die() override;
|
|
};
|
|
|
|
}
|