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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 m_loaders->add(loader); | 975 m_loaders->add(loader); |
976 } else { | 976 } else { |
977 if (!m_nonBlockingLoaders) | 977 if (!m_nonBlockingLoaders) |
978 m_nonBlockingLoaders = ResourceLoaderSet::create(); | 978 m_nonBlockingLoaders = ResourceLoaderSet::create(); |
979 m_nonBlockingLoaders->add(loader); | 979 m_nonBlockingLoaders->add(loader); |
980 } | 980 } |
981 | 981 |
982 context().willStartLoadingResource(resource, request); | 982 context().willStartLoadingResource(resource, request); |
983 storeResourceTimingInitiatorInformation(resource); | 983 storeResourceTimingInitiatorInformation(resource); |
984 | 984 |
985 context().dispatchWillSendRequest(resource->identifier(), request, ResourceR
esponse(), resource->options().initiatorInfo); | 985 context().dispatchWillSendRequest(resource, request, ResourceResponse()); |
986 } | 986 } |
987 | 987 |
988 void ResourceFetcher::removeResourceLoader(ResourceLoader* loader) | 988 void ResourceFetcher::removeResourceLoader(ResourceLoader* loader) |
989 { | 989 { |
990 if (m_loaders && m_loaders->contains(loader)) | 990 if (m_loaders && m_loaders->contains(loader)) |
991 m_loaders->remove(loader); | 991 m_loaders->remove(loader); |
992 else if (m_nonBlockingLoaders && m_nonBlockingLoaders->contains(loader)) | 992 else if (m_nonBlockingLoaders && m_nonBlockingLoaders->contains(loader)) |
993 m_nonBlockingLoaders->remove(loader); | 993 m_nonBlockingLoaders->remove(loader); |
994 else | 994 else |
995 ASSERT_NOT_REACHED(); | 995 ASSERT_NOT_REACHED(); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 return false; | 1044 return false; |
1045 } | 1045 } |
1046 } | 1046 } |
1047 if (resource->getType() == Resource::Image && shouldDeferImageLoad(newRe
quest.url())) | 1047 if (resource->getType() == Resource::Image && shouldDeferImageLoad(newRe
quest.url())) |
1048 return false; | 1048 return false; |
1049 } | 1049 } |
1050 | 1050 |
1051 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resource); | 1051 ResourceTimingInfoMap::iterator it = m_resourceTimingInfoMap.find(resource); |
1052 if (it != m_resourceTimingInfoMap.end()) | 1052 if (it != m_resourceTimingInfoMap.end()) |
1053 it->value->addRedirect(redirectResponse); | 1053 it->value->addRedirect(redirectResponse); |
1054 context().dispatchWillSendRequest(resource->identifier(), newRequest, redire
ctResponse, resource->options().initiatorInfo); | 1054 context().dispatchWillSendRequest(resource, newRequest, redirectResponse); |
1055 return true; | 1055 return true; |
1056 } | 1056 } |
1057 | 1057 |
1058 void ResourceFetcher::updateAllImageResourcePriorities() | 1058 void ResourceFetcher::updateAllImageResourcePriorities() |
1059 { | 1059 { |
1060 if (!m_loaders) | 1060 if (!m_loaders) |
1061 return; | 1061 return; |
1062 | 1062 |
1063 TRACE_EVENT0("blink", "ResourceLoadPriorityOptimizer::updateAllImageResource
Priorities"); | 1063 TRACE_EVENT0("blink", "ResourceLoadPriorityOptimizer::updateAllImageResource
Priorities"); |
1064 for (const auto& loader : m_loaders->hashSet()) { | 1064 for (const auto& loader : m_loaders->hashSet()) { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 visitor->trace(m_loaders); | 1193 visitor->trace(m_loaders); |
1194 visitor->trace(m_nonBlockingLoaders); | 1194 visitor->trace(m_nonBlockingLoaders); |
1195 #if ENABLE(OILPAN) | 1195 #if ENABLE(OILPAN) |
1196 visitor->trace(m_documentResources); | 1196 visitor->trace(m_documentResources); |
1197 visitor->trace(m_preloads); | 1197 visitor->trace(m_preloads); |
1198 visitor->trace(m_resourceTimingInfoMap); | 1198 visitor->trace(m_resourceTimingInfoMap); |
1199 #endif | 1199 #endif |
1200 } | 1200 } |
1201 | 1201 |
1202 } // namespace blink | 1202 } // namespace blink |
OLD | NEW |