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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "platform/mhtml/ArchiveResource.h" | 43 #include "platform/mhtml/ArchiveResource.h" |
44 #include "platform/mhtml/MHTMLArchive.h" | 44 #include "platform/mhtml/MHTMLArchive.h" |
45 #include "platform/network/ResourceTimingInfo.h" | 45 #include "platform/network/ResourceTimingInfo.h" |
46 #include "platform/weborigin/KnownPorts.h" | 46 #include "platform/weborigin/KnownPorts.h" |
47 #include "platform/weborigin/SecurityOrigin.h" | 47 #include "platform/weborigin/SecurityOrigin.h" |
48 #include "platform/weborigin/SecurityPolicy.h" | 48 #include "platform/weborigin/SecurityPolicy.h" |
49 #include "public/platform/Platform.h" | 49 #include "public/platform/Platform.h" |
50 #include "public/platform/WebCachePolicy.h" | 50 #include "public/platform/WebCachePolicy.h" |
51 #include "public/platform/WebURL.h" | 51 #include "public/platform/WebURL.h" |
52 #include "public/platform/WebURLRequest.h" | 52 #include "public/platform/WebURLRequest.h" |
| 53 #include "public/platform/WebViewScheduler.h" |
53 #include "wtf/text/CString.h" | 54 #include "wtf/text/CString.h" |
54 #include "wtf/text/WTFString.h" | 55 #include "wtf/text/WTFString.h" |
55 #include <memory> | 56 #include <memory> |
56 | 57 |
57 using blink::WebURLRequest; | 58 using blink::WebURLRequest; |
58 | 59 |
59 namespace blink { | 60 namespace blink { |
60 | 61 |
61 namespace { | 62 namespace { |
62 | 63 |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 } | 986 } |
986 | 987 |
987 ResourceLoader* loader = ResourceLoader::create(this, resource); | 988 ResourceLoader* loader = ResourceLoader::create(this, resource); |
988 if (resource->shouldBlockLoadEvent()) | 989 if (resource->shouldBlockLoadEvent()) |
989 m_loaders.add(loader); | 990 m_loaders.add(loader); |
990 else | 991 else |
991 m_nonBlockingLoaders.add(loader); | 992 m_nonBlockingLoaders.add(loader); |
992 | 993 |
993 storeResourceTimingInitiatorInformation(resource); | 994 storeResourceTimingInitiatorInformation(resource); |
994 resource->setFetcherSecurityOrigin(context().getSecurityOrigin()); | 995 resource->setFetcherSecurityOrigin(context().getSecurityOrigin()); |
995 loader->start(resource->resourceRequest(), context().loadingTaskRunner(), co
ntext().defersLoading()); | 996 WeakPtr<WebViewScheduler> webViewScheduler; |
| 997 // Note in some of the tests there isn't a WebViewScheduler. |
| 998 if (context().webViewScheduler()) |
| 999 webViewScheduler = context().webViewScheduler()->createWeakPtr(); |
| 1000 loader->start(resource->resourceRequest(), context().loadingTaskRunner(), we
bViewScheduler, context().defersLoading()); |
996 return true; | 1001 return true; |
997 } | 1002 } |
998 | 1003 |
999 void ResourceFetcher::removeResourceLoader(ResourceLoader* loader) | 1004 void ResourceFetcher::removeResourceLoader(ResourceLoader* loader) |
1000 { | 1005 { |
1001 if (m_loaders.contains(loader)) | 1006 if (m_loaders.contains(loader)) |
1002 m_loaders.remove(loader); | 1007 m_loaders.remove(loader); |
1003 else if (m_nonBlockingLoaders.contains(loader)) | 1008 else if (m_nonBlockingLoaders.contains(loader)) |
1004 m_nonBlockingLoaders.remove(loader); | 1009 m_nonBlockingLoaders.remove(loader); |
1005 else | 1010 else |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 visitor->trace(m_context); | 1266 visitor->trace(m_context); |
1262 visitor->trace(m_archive); | 1267 visitor->trace(m_archive); |
1263 visitor->trace(m_loaders); | 1268 visitor->trace(m_loaders); |
1264 visitor->trace(m_nonBlockingLoaders); | 1269 visitor->trace(m_nonBlockingLoaders); |
1265 visitor->trace(m_documentResources); | 1270 visitor->trace(m_documentResources); |
1266 visitor->trace(m_preloads); | 1271 visitor->trace(m_preloads); |
1267 visitor->trace(m_resourceTimingInfoMap); | 1272 visitor->trace(m_resourceTimingInfoMap); |
1268 } | 1273 } |
1269 | 1274 |
1270 } // namespace blink | 1275 } // namespace blink |
OLD | NEW |