WebAuthnProcessProxy.h [plain text]
#pragma once
#if ENABLE(WEB_AUTHN)
#include "AuxiliaryProcessProxy.h"
#include "ProcessLauncher.h"
#include "ProcessThrottler.h"
#include "ProcessThrottlerClient.h"
#include "WebPageProxyIdentifier.h"
#include "WebProcessProxyMessagesReplies.h"
#include <memory>
namespace WebKit {
class WebProcessProxy;
class WebsiteDataStore;
struct WebAuthnProcessCreationParameters;
class WebAuthnProcessProxy final : public AuxiliaryProcessProxy, private ProcessThrottlerClient, public CanMakeWeakPtr<WebAuthnProcessProxy> {
WTF_MAKE_FAST_ALLOCATED;
WTF_MAKE_NONCOPYABLE(WebAuthnProcessProxy);
friend LazyNeverDestroyed<WebAuthnProcessProxy>;
public:
static WebAuthnProcessProxy& singleton();
void getWebAuthnProcessConnection(WebProcessProxy&, Messages::WebProcessProxy::GetWebAuthnProcessConnectionDelayedReply&&);
ProcessThrottler& throttler() final { return m_throttler; }
void updateProcessAssertion();
void sendProcessDidResume() final { }
ASCIILiteral clientName() const final { return "WebAuthnProcess"_s; }
private:
explicit WebAuthnProcessProxy();
~WebAuthnProcessProxy();
ASCIILiteral processName() const final { return "WebAuthn"_s; }
void getLaunchOptions(ProcessLauncher::LaunchOptions&) override;
void connectionWillOpen(IPC::Connection&) override;
void processWillShutDown(IPC::Connection&) override;
void webAuthnProcessCrashed();
void sendPrepareToSuspend(IsSuspensionImminent, CompletionHandler<void()>&& completionHandler) final { completionHandler(); }
void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override;
void didClose(IPC::Connection&) override;
void didReceiveInvalidMessage(IPC::Connection&, IPC::MessageName) override;
ProcessThrottler m_throttler;
ProcessThrottler::ActivityVariant m_activityFromWebProcesses;
};
}
#endif // ENABLE(WEB_AUTHN)