CustomProtocolManagerProxySoup.cpp [plain text]
#include "config.h"
#include "CustomProtocolManagerProxy.h"
#if ENABLE(CUSTOM_PROTOCOLS)
#include "ChildProcessProxy.h"
#include "CustomProtocolManagerMessages.h"
#include "CustomProtocolManagerProxyMessages.h"
#include "WebContext.h"
#include "WebSoupCustomProtocolRequestManager.h"
#include <WebCore/ResourceRequest.h>
namespace WebKit {
CustomProtocolManagerProxy::CustomProtocolManagerProxy(ChildProcessProxy* childProcessProxy, WebContext& webContext)
: m_childProcessProxy(childProcessProxy)
, m_webContext(webContext)
{
ASSERT(m_childProcessProxy);
m_childProcessProxy->addMessageReceiver(Messages::CustomProtocolManagerProxy::messageReceiverName(), *this);
}
void CustomProtocolManagerProxy::startLoading(uint64_t customProtocolID, const WebCore::ResourceRequest& request)
{
m_webContext.supplement<WebSoupCustomProtocolRequestManager>()->startLoading(customProtocolID, request);
}
void CustomProtocolManagerProxy::stopLoading(uint64_t customProtocolID)
{
m_webContext.supplement<WebSoupCustomProtocolRequestManager>()->stopLoading(customProtocolID);
}
}
#endif // ENABLE(CUSTOM_PROTOCOLS)