void LinkImport::process() { if (m_child) return; if (!m_owner) return; if (!shouldLoadResource()) return; if (!m_owner->document().import()) { ASSERT(m_owner->document().frame()); // The document should be the master. HTMLImportsController::provideTo(m_owner->document()); } LinkRequestBuilder builder(m_owner); if (!builder.isValid()) { didFinish(); return; } HTMLImport* parent = m_owner->document().import(); HTMLImportsController* controller = parent->controller(); m_child = controller->load(parent, this, builder.build(true)); if (!m_child) { didFinish(); return; } }
bool BlobRegistryImpl::loadResourceSynchronously(const ResourceRequest& request, ResourceError& error, ResourceResponse& response, Vector<char>& data) { if (!shouldLoadResource(request)) return false; BlobResourceHandle::loadResourceSynchronously(m_blobs.get(request.url().string()), request, error, response, data); return true; }
PassRefPtr<ResourceHandle> BlobRegistryImpl::createResourceHandle(const ResourceRequest& request, ResourceHandleClient* client) { if (!shouldLoadResource(request)) return 0; RefPtr<BlobResourceHandle> handle = BlobResourceHandle::create(m_blobs.get(request.url().string()), request, client); handle->start(); return handle.release(); }