ResourceHandleQt.cpp [plain text]
#include "config.h"
#include "Frame.h"
#include "DocLoader.h"
#include "ResourceHandle.h"
#include "DeprecatedString.h"
#include "ResourceHandleInternal.h"
#include "qwebnetworkinterface_p.h"
#include "qwebpage_p.h"
#include "ChromeClientQt.h"
#include "FrameLoaderClientQt.h"
#include "Page.h"
#include "NotImplemented.h"
namespace WebCore {
ResourceHandleInternal::~ResourceHandleInternal()
{
}
ResourceHandle::~ResourceHandle()
{
if (d->m_job)
cancel();
}
bool ResourceHandle::start(Frame* frame)
{
if (!frame)
return false;
Page *page = frame->page();
if (!page)
return false;
if (d->m_request.httpMethod() != "GET" && d->m_request.httpMethod() != "POST") {
notImplemented();
return false;
}
getInternal()->m_frame = static_cast<FrameLoaderClientQt*>(frame->loader()->client())->webFrame();
return QWebNetworkManager::self()->add(this, getInternal()->m_frame->page()->d->networkInterface);
}
void ResourceHandle::cancel()
{
QWebNetworkManager::self()->cancel(this);
}
bool ResourceHandle::loadsBlocked()
{
notImplemented();
return false;
}
bool ResourceHandle::willLoadFromCache(ResourceRequest& request)
{
notImplemented();
return false;
}
bool ResourceHandle::supportsBufferedData()
{
notImplemented();
return false;
}
PassRefPtr<SharedBuffer> ResourceHandle::bufferedData()
{
notImplemented();
return 0;
}
void ResourceHandle::loadResourceSynchronously(const ResourceRequest& request, ResourceError& e, ResourceResponse& r, Vector<char>& data)
{
notImplemented();
}
void ResourceHandle::setDefersLoading(bool defers)
{
d->m_defersLoading = defers;
}
}