WebProcessConnection.h [plain text]
#ifndef WebProcessConnection_h
#define WebProcessConnection_h
#if ENABLE(PLUGIN_PROCESS)
#include "Connection.h"
#include "Plugin.h"
#include <wtf/RefCounted.h>
namespace WebKit {
class NPRemoteObjectMap;
class PluginControllerProxy;
struct PluginCreationParameters;
class WebProcessConnection : public RefCounted<WebProcessConnection>, CoreIPC::Connection::Client {
public:
static PassRefPtr<WebProcessConnection> create(CoreIPC::Connection::Identifier);
virtual ~WebProcessConnection();
CoreIPC::Connection* connection() const { return m_connection.get(); }
NPRemoteObjectMap* npRemoteObjectMap() const { return m_npRemoteObjectMap.get(); }
void removePluginControllerProxy(PluginControllerProxy*, Plugin*);
static void setGlobalException(const String&);
private:
WebProcessConnection(CoreIPC::Connection::Identifier);
void addPluginControllerProxy(PassOwnPtr<PluginControllerProxy>);
void destroyPluginControllerProxy(PluginControllerProxy*);
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
virtual void didClose(CoreIPC::Connection*);
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::MessageID);
void didReceiveSyncWebProcessConnectionMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, OwnPtr<CoreIPC::ArgumentEncoder>&);
void createPlugin(const PluginCreationParameters&, bool& result, bool& wantsWheelEvents, uint32_t& remoteLayerClientID);
void destroyPlugin(uint64_t pluginInstanceID);
RefPtr<CoreIPC::Connection> m_connection;
HashMap<uint64_t, PluginControllerProxy*> m_pluginControllers;
RefPtr<NPRemoteObjectMap> m_npRemoteObjectMap;
};
}
#endif // ENABLE(PLUGIN_PROCESS)
#endif // WebProcessConnection_h