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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 !shouldDeferImageLoad(resource->url())) | 1053 !shouldDeferImageLoad(resource->url())) |
1054 startLoad(resource); | 1054 startLoad(resource); |
1055 } | 1055 } |
1056 } | 1056 } |
1057 | 1057 |
1058 void ResourceFetcher::clearContext() { | 1058 void ResourceFetcher::clearContext() { |
1059 clearPreloads(ResourceFetcher::ClearAllPreloads); | 1059 clearPreloads(ResourceFetcher::ClearAllPreloads); |
1060 m_context.clear(); | 1060 m_context.clear(); |
1061 } | 1061 } |
1062 | 1062 |
1063 int ResourceFetcher::requestCount() const { | 1063 int ResourceFetcher::blockingRequestCount() const { |
1064 return m_loaders.size(); | 1064 return m_loaders.size(); |
1065 } | 1065 } |
1066 | 1066 |
1067 bool ResourceFetcher::hasPendingRequest() const { | 1067 int ResourceFetcher::nonblockingRequestCount() const { |
1068 return m_loaders.size() > 0 || m_nonBlockingLoaders.size() > 0; | 1068 return m_nonBlockingLoaders.size(); |
1069 } | 1069 } |
1070 | 1070 |
1071 void ResourceFetcher::preloadStarted(Resource* resource) { | 1071 void ResourceFetcher::preloadStarted(Resource* resource) { |
1072 if (m_preloads && m_preloads->contains(resource)) | 1072 if (m_preloads && m_preloads->contains(resource)) |
1073 return; | 1073 return; |
1074 resource->increasePreloadCount(); | 1074 resource->increasePreloadCount(); |
1075 | 1075 |
1076 if (!m_preloads) | 1076 if (!m_preloads) |
1077 m_preloads = new HeapListHashSet<Member<Resource>>; | 1077 m_preloads = new HeapListHashSet<Member<Resource>>; |
1078 m_preloads->insert(resource); | 1078 m_preloads->insert(resource); |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 visitor->trace(m_context); | 1552 visitor->trace(m_context); |
1553 visitor->trace(m_archive); | 1553 visitor->trace(m_archive); |
1554 visitor->trace(m_loaders); | 1554 visitor->trace(m_loaders); |
1555 visitor->trace(m_nonBlockingLoaders); | 1555 visitor->trace(m_nonBlockingLoaders); |
1556 visitor->trace(m_documentResources); | 1556 visitor->trace(m_documentResources); |
1557 visitor->trace(m_preloads); | 1557 visitor->trace(m_preloads); |
1558 visitor->trace(m_resourceTimingInfoMap); | 1558 visitor->trace(m_resourceTimingInfoMap); |
1559 } | 1559 } |
1560 | 1560 |
1561 } // namespace blink | 1561 } // namespace blink |
OLD | NEW |