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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
5 rights reserved. | 5 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 | 152 |
153 static void determineRequestContext(ResourceRequest&, | 153 static void determineRequestContext(ResourceRequest&, |
154 Resource::Type, | 154 Resource::Type, |
155 bool isMainFrame); | 155 bool isMainFrame); |
156 void determineRequestContext(ResourceRequest&, Resource::Type); | 156 void determineRequestContext(ResourceRequest&, Resource::Type); |
157 | 157 |
158 void updateAllImageResourcePriorities(); | 158 void updateAllImageResourcePriorities(); |
159 | 159 |
160 void reloadLoFiImages(); | 160 void reloadLoFiImages(); |
161 | 161 |
162 // Calling this method before main resource is fetched is invalid. | |
Yoav Weiss
2016/12/03 19:55:35
Nit: spurious space
sunjian
2016/12/07 19:09:50
Done.
| |
163 ResourceTimingInfo* getMainResourceTimingInfo(); | |
164 | |
162 // This is only exposed for testing purposes. | 165 // This is only exposed for testing purposes. |
163 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } | 166 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } |
164 | 167 |
165 private: | 168 private: |
166 friend class ResourceCacheValidationSuppressor; | 169 friend class ResourceCacheValidationSuppressor; |
167 | 170 |
168 explicit ResourceFetcher(FetchContext*); | 171 explicit ResourceFetcher(FetchContext*); |
169 | 172 |
170 void initializeRevalidation(ResourceRequest&, Resource*); | 173 void initializeRevalidation(ResourceRequest&, Resource*); |
171 Resource* createResourceForLoading(FetchRequest&, | 174 Resource* createResourceForLoading(FetchRequest&, |
172 const String& charset, | 175 const String& charset, |
173 const ResourceFactory&); | 176 const ResourceFactory&); |
174 void storeResourceTimingInitiatorInformation(Resource*); | 177 void storePerformanceTimingInitiatorInformation(Resource*); |
175 ResourceLoadPriority computeLoadPriority(Resource::Type, | 178 ResourceLoadPriority computeLoadPriority(Resource::Type, |
176 const FetchRequest&, | 179 const FetchRequest&, |
177 ResourcePriority::VisibilityStatus); | 180 ResourcePriority::VisibilityStatus); |
178 | 181 |
179 Resource* resourceForStaticData(const FetchRequest&, | 182 Resource* resourceForStaticData(const FetchRequest&, |
180 const ResourceFactory&, | 183 const ResourceFactory&, |
181 const SubstituteData&); | 184 const SubstituteData&); |
182 Resource* resourceForBlockedRequest(const FetchRequest&, | 185 Resource* resourceForBlockedRequest(const FetchRequest&, |
183 const ResourceFactory&); | 186 const ResourceFactory&); |
184 | 187 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 | 225 |
223 Member<HeapListHashSet<Member<Resource>>> m_preloads; | 226 Member<HeapListHashSet<Member<Resource>>> m_preloads; |
224 Member<MHTMLArchive> m_archive; | 227 Member<MHTMLArchive> m_archive; |
225 | 228 |
226 Timer<ResourceFetcher> m_resourceTimingReportTimer; | 229 Timer<ResourceFetcher> m_resourceTimingReportTimer; |
227 | 230 |
228 using ResourceTimingInfoMap = | 231 using ResourceTimingInfoMap = |
229 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; | 232 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; |
230 ResourceTimingInfoMap m_resourceTimingInfoMap; | 233 ResourceTimingInfoMap m_resourceTimingInfoMap; |
231 | 234 |
235 unsigned long m_mainResourceIdentifier; | |
236 std::unique_ptr<ResourceTimingInfo> m_mainResourceTimingInfo; | |
237 | |
232 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; | 238 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
233 | 239 |
234 HeapHashSet<Member<ResourceLoader>> m_loaders; | 240 HeapHashSet<Member<ResourceLoader>> m_loaders; |
235 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; | 241 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; |
236 | 242 |
237 // Used in hit rate histograms. | 243 // Used in hit rate histograms. |
238 class DeadResourceStatsRecorder { | 244 class DeadResourceStatsRecorder { |
239 DISALLOW_NEW(); | 245 DISALLOW_NEW(); |
240 | 246 |
241 public: | 247 public: |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 } | 284 } |
279 | 285 |
280 private: | 286 private: |
281 Member<ResourceFetcher> m_loader; | 287 Member<ResourceFetcher> m_loader; |
282 bool m_previousState; | 288 bool m_previousState; |
283 }; | 289 }; |
284 | 290 |
285 } // namespace blink | 291 } // namespace blink |
286 | 292 |
287 #endif // ResourceFetcher_h | 293 #endif // ResourceFetcher_h |
OLD | NEW |