UIMessagePortChannelProvider.h [plain text]
#pragma once
#include <WebCore/MessagePortChannelProvider.h>
#include <WebCore/MessagePortChannelRegistry.h>
namespace WebKit {
class UIMessagePortChannelProvider : public WebCore::MessagePortChannelProvider {
public:
static UIMessagePortChannelProvider& singleton();
WebCore::MessagePortChannelRegistry& registry() { return m_registry; }
private:
UIMessagePortChannelProvider();
~UIMessagePortChannelProvider() final;
void createNewMessagePortChannel(const WebCore::MessagePortIdentifier& local, const WebCore::MessagePortIdentifier& remote) final;
void entangleLocalPortInThisProcessToRemote(const WebCore::MessagePortIdentifier& local, const WebCore::MessagePortIdentifier& remote) final;
void messagePortDisentangled(const WebCore::MessagePortIdentifier& local) final;
void messagePortClosed(const WebCore::MessagePortIdentifier& local) final;
void takeAllMessagesForPort(const WebCore::MessagePortIdentifier&, Function<void(Vector<WebCore::MessageWithMessagePorts>&&, Function<void()>&&)>&&) final;
void postMessageToRemote(WebCore::MessageWithMessagePorts&&, const WebCore::MessagePortIdentifier& remoteTarget) final;
void checkRemotePortForActivity(const WebCore::MessagePortIdentifier& remoteTarget, CompletionHandler<void(HasActivity)>&& callback) final;
void checkProcessLocalPortForActivity(const WebCore::MessagePortIdentifier&, WebCore::ProcessIdentifier, CompletionHandler<void(HasActivity)>&&) final;
WebCore::MessagePortChannelRegistry m_registry;
};
}