Lines Matching full:resourceloader
35 #include "ResourceLoader.h"
103 void ResourceLoadScheduler::addMainResourceLoad(ResourceLoader* resourceLoader)
105 hostForURL(resourceLoader->url(), CreateIfNotFound)->addLoadInProgress(resourceLoader);
108 void ResourceLoadScheduler::scheduleLoad(ResourceLoader* resourceLoader, ResourceLoadPriority priority)
110 ASSERT(resourceLoader);
116 LOG(ResourceLoading, "ResourceLoadScheduler::load resource %p '%s'", resourceLoader, resourceLoader->url().string().latin1().data());
117 HostInformation* host = hostForURL(resourceLoader->url(), CreateIfNotFound);
119 host->schedule(resourceLoader, priority);
121 if (priority > ResourceLoadPriorityLow || !resourceLoader->url().protocolInHTTPFamily() || (priority == ResourceLoadPriorityLow && !hadRequests)) {
128 InspectorInstrumentation::didScheduleResourceRequest(resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame()->document() : 0, resourceLoader->url());
132 void ResourceLoadScheduler::remove(ResourceLoader* resourceLoader)
134 ASSERT(resourceLoader);
136 HostInformation* host = hostForURL(resourceLoader->url());
138 host->remove(resourceLoader);
142 void ResourceLoadScheduler::crossOriginRedirectReceived(ResourceLoader* resourceLoader, const KURL& redirectURL)
144 HostInformation* oldHost = hostForURL(resourceLoader->url());
151 newHost->addLoadInProgress(resourceLoader);
152 oldHost->remove(resourceLoader);
189 RefPtr<ResourceLoader> resourceLoader = requestsPending.first();
194 Document* document = resourceLoader->frameLoader() ? resourceLoader->frameLoader()->frame()->document() : 0;
200 host->addLoadInProgress(resourceLoader.get());
201 resourceLoader->start();
246 void ResourceLoadScheduler::HostInformation::schedule(ResourceLoader* resourceLoader, ResourceLoadPriority priority)
248 m_requestsPending[priority].append(resourceLoader);
251 void ResourceLoadScheduler::HostInformation::addLoadInProgress(ResourceLoader* resourceLoader)
253 LOG(ResourceLoading, "HostInformation '%s' loading '%s'. Current count %d", m_name.latin1().data(), resourceLoader->url().string().latin1().data(), m_requestsLoading.size());
254 m_requestsLoading.add(resourceLoader);
257 void ResourceLoadScheduler::HostInformation::remove(ResourceLoader* resourceLoader)
259 if (m_requestsLoading.contains(resourceLoader)) {
260 m_requestsLoading.remove(resourceLoader);
267 if (*it == resourceLoader) {