| 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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 { | 857 { |
| 858 clearPreloads(ResourceFetcher::ClearAllPreloads); | 858 clearPreloads(ResourceFetcher::ClearAllPreloads); |
| 859 m_context.clear(); | 859 m_context.clear(); |
| 860 } | 860 } |
| 861 | 861 |
| 862 int ResourceFetcher::requestCount() const | 862 int ResourceFetcher::requestCount() const |
| 863 { | 863 { |
| 864 return m_loaders.size(); | 864 return m_loaders.size(); |
| 865 } | 865 } |
| 866 | 866 |
| 867 bool ResourceFetcher::hasPendingRequest() const |
| 868 { |
| 869 return m_loaders.size() > 0 && m_nonBlockingLoaders.size() > 0; |
| 870 } |
| 871 |
| 867 void ResourceFetcher::preloadStarted(Resource* resource) | 872 void ResourceFetcher::preloadStarted(Resource* resource) |
| 868 { | 873 { |
| 869 if (m_preloads && m_preloads->contains(resource)) | 874 if (m_preloads && m_preloads->contains(resource)) |
| 870 return; | 875 return; |
| 871 TRACE_EVENT_ASYNC_STEP_INTO0("blink.net", "Resource", resource->identifier()
, "Preload"); | 876 TRACE_EVENT_ASYNC_STEP_INTO0("blink.net", "Resource", resource->identifier()
, "Preload"); |
| 872 resource->increasePreloadCount(); | 877 resource->increasePreloadCount(); |
| 873 | 878 |
| 874 if (!m_preloads) | 879 if (!m_preloads) |
| 875 m_preloads = new HeapListHashSet<Member<Resource>>; | 880 m_preloads = new HeapListHashSet<Member<Resource>>; |
| 876 m_preloads->add(resource); | 881 m_preloads->add(resource); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 visitor->trace(m_context); | 1319 visitor->trace(m_context); |
| 1315 visitor->trace(m_archive); | 1320 visitor->trace(m_archive); |
| 1316 visitor->trace(m_loaders); | 1321 visitor->trace(m_loaders); |
| 1317 visitor->trace(m_nonBlockingLoaders); | 1322 visitor->trace(m_nonBlockingLoaders); |
| 1318 visitor->trace(m_documentResources); | 1323 visitor->trace(m_documentResources); |
| 1319 visitor->trace(m_preloads); | 1324 visitor->trace(m_preloads); |
| 1320 visitor->trace(m_resourceTimingInfoMap); | 1325 visitor->trace(m_resourceTimingInfoMap); |
| 1321 } | 1326 } |
| 1322 | 1327 |
| 1323 } // namespace blink | 1328 } // namespace blink |
| OLD | NEW |