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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
6 rights reserved. | 6 rights reserved. |
7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 !shouldDeferImageLoad(resource->url())) | 1050 !shouldDeferImageLoad(resource->url())) |
1051 startLoad(resource); | 1051 startLoad(resource); |
1052 } | 1052 } |
1053 } | 1053 } |
1054 | 1054 |
1055 void ResourceFetcher::clearContext() { | 1055 void ResourceFetcher::clearContext() { |
1056 clearPreloads(ResourceFetcher::ClearAllPreloads); | 1056 clearPreloads(ResourceFetcher::ClearAllPreloads); |
1057 m_context.clear(); | 1057 m_context.clear(); |
1058 } | 1058 } |
1059 | 1059 |
1060 int ResourceFetcher::requestCount() const { | 1060 int ResourceFetcher::blockingRequestCount() const { |
1061 return m_loaders.size(); | 1061 return m_loaders.size(); |
1062 } | 1062 } |
1063 | 1063 |
1064 bool ResourceFetcher::hasPendingRequest() const { | 1064 int ResourceFetcher::nonblockingRequestCount() const { |
1065 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0; | 1065 return m_nonBlockingLoaders.size(); |
1066 } | 1066 } |
1067 | 1067 |
1068 void ResourceFetcher::preloadStarted(Resource* resource) { | 1068 void ResourceFetcher::preloadStarted(Resource* resource) { |
1069 if (m_preloads && m_preloads->contains(resource)) | 1069 if (m_preloads && m_preloads->contains(resource)) |
1070 return; | 1070 return; |
1071 resource->increasePreloadCount(); | 1071 resource->increasePreloadCount(); |
1072 | 1072 |
1073 if (!m_preloads) | 1073 if (!m_preloads) |
1074 m_preloads = new HeapListHashSet<Member<Resource>>; | 1074 m_preloads = new HeapListHashSet<Member<Resource>>; |
1075 m_preloads->add(resource); | 1075 m_preloads->add(resource); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 visitor->trace(m_context); | 1549 visitor->trace(m_context); |
1550 visitor->trace(m_archive); | 1550 visitor->trace(m_archive); |
1551 visitor->trace(m_loaders); | 1551 visitor->trace(m_loaders); |
1552 visitor->trace(m_nonBlockingLoaders); | 1552 visitor->trace(m_nonBlockingLoaders); |
1553 visitor->trace(m_documentResources); | 1553 visitor->trace(m_documentResources); |
1554 visitor->trace(m_preloads); | 1554 visitor->trace(m_preloads); |
1555 visitor->trace(m_resourceTimingInfoMap); | 1555 visitor->trace(m_resourceTimingInfoMap); |
1556 } | 1556 } |
1557 | 1557 |
1558 } // namespace blink | 1558 } // namespace blink |
OLD | NEW |