NetworkProcessConnection.h [plain text]
#ifndef NetworkProcessConnection_h
#define NetworkProcessConnection_h
#include "Connection.h"
#include "ShareableResource.h"
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
#if ENABLE(NETWORK_PROCESS)
namespace CoreIPC {
class DataReference;
}
namespace WebCore {
class ResourceError;
class ResourceRequest;
class ResourceResponse;
}
namespace WebKit {
typedef uint64_t ResourceLoadIdentifier;
class NetworkProcessConnection : public RefCounted<NetworkProcessConnection>, CoreIPC::Connection::Client {
public:
static PassRefPtr<NetworkProcessConnection> create(CoreIPC::Connection::Identifier connectionIdentifier)
{
return adoptRef(new NetworkProcessConnection(connectionIdentifier));
}
~NetworkProcessConnection();
CoreIPC::Connection* connection() const { return m_connection.get(); }
void didReceiveNetworkProcessConnectionMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
private:
NetworkProcessConnection(CoreIPC::Connection::Identifier);
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&, OwnPtr<CoreIPC::MessageEncoder>&) OVERRIDE;
virtual void didClose(CoreIPC::Connection*) OVERRIDE;
virtual void didReceiveInvalidMessage(CoreIPC::Connection*, CoreIPC::StringReference messageReceiverName, CoreIPC::StringReference messageName) OVERRIDE;
void didCacheResource(const WebCore::ResourceRequest&, const ShareableResource::Handle&);
RefPtr<CoreIPC::Connection> m_connection;
};
}
#endif // ENABLE(NETWORK_PROCESS)
#endif // NetworkProcessConnection_h