OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 Copyright (C) 2010 Google Inc. All rights reserved. | 7 Copyright (C) 2010 Google Inc. All rights reserved. |
8 | 8 |
9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 , m_requestTimer(this, &ResourceLoadScheduler::requestTimerFired) | 77 , m_requestTimer(this, &ResourceLoadScheduler::requestTimerFired) |
78 , m_isSuspendingPendingRequests(false) | 78 , m_isSuspendingPendingRequests(false) |
79 , m_isSerialLoadingEnabled(false) | 79 , m_isSerialLoadingEnabled(false) |
80 { | 80 { |
81 #if REQUEST_MANAGEMENT_ENABLED | 81 #if REQUEST_MANAGEMENT_ENABLED |
82 maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost(); | 82 maxRequestsInFlightPerHost = initializeMaximumHTTPConnectionCountPerHost(); |
83 #endif | 83 #endif |
84 } | 84 } |
85 | 85 |
86 PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Fra
me* frame, SubresourceLoaderClient* client, const ResourceRequest& request, Reso
urceLoadPriority priority, SecurityCheckPolicy securityCheck, | 86 PassRefPtr<SubresourceLoader> ResourceLoadScheduler::scheduleSubresourceLoad(Fra
me* frame, SubresourceLoaderClient* client, const ResourceRequest& request, Reso
urceLoadPriority priority, SecurityCheckPolicy securityCheck, |
87 boo
l sendResourceLoadCallbacks, bool shouldContentSniff, const String& optionalOutg
oingReferrer) | 87 boo
l sendResourceLoadCallbacks, bool shouldContentSniff, const String& optionalOutg
oingReferrer, bool shouldBufferData) |
88 { | 88 { |
89 RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, client,
request, securityCheck, sendResourceLoadCallbacks, shouldContentSniff, optionalO
utgoingReferrer); | 89 RefPtr<SubresourceLoader> loader = SubresourceLoader::create(frame, client,
request, securityCheck, sendResourceLoadCallbacks, shouldContentSniff, optionalO
utgoingReferrer, shouldBufferData); |
90 if (loader) | 90 if (loader) |
91 scheduleLoad(loader.get(), priority); | 91 scheduleLoad(loader.get(), priority); |
92 return loader.release(); | 92 return loader.release(); |
93 } | 93 } |
94 | 94 |
95 PassRefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStre
amLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceReq
uest& request) | 95 PassRefPtr<NetscapePlugInStreamLoader> ResourceLoadScheduler::schedulePluginStre
amLoad(Frame* frame, NetscapePlugInStreamLoaderClient* client, const ResourceReq
uest& request) |
96 { | 96 { |
97 PassRefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::
create(frame, client, request); | 97 PassRefPtr<NetscapePlugInStreamLoader> loader = NetscapePlugInStreamLoader::
create(frame, client, request); |
98 if (loader) | 98 if (loader) |
99 scheduleLoad(loader.get(), ResourceLoadPriorityLow); | 99 scheduleLoad(loader.get(), ResourceLoadPriorityLow); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 284 } |
285 | 285 |
286 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority
priority) const | 286 bool ResourceLoadScheduler::HostInformation::limitRequests(ResourceLoadPriority
priority) const |
287 { | 287 { |
288 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty()) | 288 if (priority == ResourceLoadPriorityVeryLow && !m_requestsLoading.isEmpty()) |
289 return true; | 289 return true; |
290 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading
Enabled() ? 1 : m_maxRequestsInFlight); | 290 return m_requestsLoading.size() >= (resourceLoadScheduler()->isSerialLoading
Enabled() ? 1 : m_maxRequestsInFlight); |
291 } | 291 } |
292 | 292 |
293 } // namespace WebCore | 293 } // namespace WebCore |
OLD | NEW |