| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 static void determineRequestContext(ResourceRequest&, | 146 static void determineRequestContext(ResourceRequest&, |
| 147 Resource::Type, | 147 Resource::Type, |
| 148 bool isMainFrame); | 148 bool isMainFrame); |
| 149 void determineRequestContext(ResourceRequest&, Resource::Type); | 149 void determineRequestContext(ResourceRequest&, Resource::Type); |
| 150 | 150 |
| 151 void updateAllImageResourcePriorities(); | 151 void updateAllImageResourcePriorities(); |
| 152 | 152 |
| 153 void reloadLoFiImages(); | 153 void reloadLoFiImages(); |
| 154 | 154 |
| 155 // Calling this method before main document resource is fetched is invalid. |
| 156 ResourceTimingInfo* getNavigationTimingInfo(); |
| 157 |
| 155 // This is only exposed for testing purposes. | 158 // This is only exposed for testing purposes. |
| 156 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } | 159 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } |
| 157 | 160 |
| 158 // Workaround for https://crbug.com/666214. | 161 // Workaround for https://crbug.com/666214. |
| 159 // TODO(hiroshige): Remove this hack. | 162 // TODO(hiroshige): Remove this hack. |
| 160 void emulateLoadStartedForInspector(Resource*, | 163 void emulateLoadStartedForInspector(Resource*, |
| 161 const KURL&, | 164 const KURL&, |
| 162 WebURLRequest::RequestContext, | 165 WebURLRequest::RequestContext, |
| 163 const AtomicString& initiatorName); | 166 const AtomicString& initiatorName); |
| 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 ResourceRequestBlockedReason); | 187 ResourceRequestBlockedReason); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 233 |
| 231 Member<HeapListHashSet<Member<Resource>>> m_preloads; | 234 Member<HeapListHashSet<Member<Resource>>> m_preloads; |
| 232 Member<MHTMLArchive> m_archive; | 235 Member<MHTMLArchive> m_archive; |
| 233 | 236 |
| 234 Timer<ResourceFetcher> m_resourceTimingReportTimer; | 237 Timer<ResourceFetcher> m_resourceTimingReportTimer; |
| 235 | 238 |
| 236 using ResourceTimingInfoMap = | 239 using ResourceTimingInfoMap = |
| 237 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; | 240 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; |
| 238 ResourceTimingInfoMap m_resourceTimingInfoMap; | 241 ResourceTimingInfoMap m_resourceTimingInfoMap; |
| 239 | 242 |
| 243 std::unique_ptr<ResourceTimingInfo> m_navigationTimingInfo; |
| 244 |
| 240 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; | 245 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
| 241 | 246 |
| 242 HeapHashSet<Member<ResourceLoader>> m_loaders; | 247 HeapHashSet<Member<ResourceLoader>> m_loaders; |
| 243 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; | 248 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; |
| 244 | 249 |
| 245 // Used in hit rate histograms. | 250 // Used in hit rate histograms. |
| 246 class DeadResourceStatsRecorder { | 251 class DeadResourceStatsRecorder { |
| 247 DISALLOW_NEW(); | 252 DISALLOW_NEW(); |
| 248 | 253 |
| 249 public: | 254 public: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 } | 291 } |
| 287 | 292 |
| 288 private: | 293 private: |
| 289 Member<ResourceFetcher> m_loader; | 294 Member<ResourceFetcher> m_loader; |
| 290 bool m_previousState; | 295 bool m_previousState; |
| 291 }; | 296 }; |
| 292 | 297 |
| 293 } // namespace blink | 298 } // namespace blink |
| 294 | 299 |
| 295 #endif // ResourceFetcher_h | 300 #endif // ResourceFetcher_h |
| OLD | NEW |