| 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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
| 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 7 | 7 |
| 8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
| 9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
| 10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 if (resource->getType() == Resource::Image && resource->stillNeedsLoad()
&& !shouldDeferImageLoad(resource->url())) | 848 if (resource->getType() == Resource::Image && resource->stillNeedsLoad()
&& !shouldDeferImageLoad(resource->url())) |
| 849 startLoad(resource); | 849 startLoad(resource); |
| 850 } | 850 } |
| 851 } | 851 } |
| 852 | 852 |
| 853 int ResourceFetcher::requestCount() const | 853 int ResourceFetcher::requestCount() const |
| 854 { | 854 { |
| 855 return m_loaders.size(); | 855 return m_loaders.size(); |
| 856 } | 856 } |
| 857 | 857 |
| 858 bool ResourceFetcher::hasPendingRequest() const |
| 859 { |
| 860 return m_loaders.size() > 0 && m_nonBlockingLoaders.size() > 0; |
| 861 } |
| 862 |
| 858 void ResourceFetcher::preloadStarted(Resource* resource) | 863 void ResourceFetcher::preloadStarted(Resource* resource) |
| 859 { | 864 { |
| 860 if (m_preloads && m_preloads->contains(resource)) | 865 if (m_preloads && m_preloads->contains(resource)) |
| 861 return; | 866 return; |
| 862 TRACE_EVENT_ASYNC_STEP_INTO0("blink.net", "Resource", resource->identifier()
, "Preload"); | 867 TRACE_EVENT_ASYNC_STEP_INTO0("blink.net", "Resource", resource->identifier()
, "Preload"); |
| 863 resource->increasePreloadCount(); | 868 resource->increasePreloadCount(); |
| 864 | 869 |
| 865 if (!m_preloads) | 870 if (!m_preloads) |
| 866 m_preloads = new HeapListHashSet<Member<Resource>>; | 871 m_preloads = new HeapListHashSet<Member<Resource>>; |
| 867 m_preloads->add(resource); | 872 m_preloads->add(resource); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 visitor->trace(m_context); | 1306 visitor->trace(m_context); |
| 1302 visitor->trace(m_archive); | 1307 visitor->trace(m_archive); |
| 1303 visitor->trace(m_loaders); | 1308 visitor->trace(m_loaders); |
| 1304 visitor->trace(m_nonBlockingLoaders); | 1309 visitor->trace(m_nonBlockingLoaders); |
| 1305 visitor->trace(m_documentResources); | 1310 visitor->trace(m_documentResources); |
| 1306 visitor->trace(m_preloads); | 1311 visitor->trace(m_preloads); |
| 1307 visitor->trace(m_resourceTimingInfoMap); | 1312 visitor->trace(m_resourceTimingInfoMap); |
| 1308 } | 1313 } |
| 1309 | 1314 |
| 1310 } // namespace blink | 1315 } // namespace blink |
| OLD | NEW |