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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
135 static void determineRequestContext(ResourceRequest&, | 135 static void determineRequestContext(ResourceRequest&, |
136 Resource::Type, | 136 Resource::Type, |
137 bool isMainFrame); | 137 bool isMainFrame); |
138 void determineRequestContext(ResourceRequest&, Resource::Type); | 138 void determineRequestContext(ResourceRequest&, Resource::Type); |
139 | 139 |
140 void updateAllImageResourcePriorities(); | 140 void updateAllImageResourcePriorities(); |
141 | 141 |
142 void reloadLoFiImages(); | 142 void reloadLoFiImages(); |
143 | 143 |
144 // Calling this method before main document resource is fetched is invalid. | 144 // Calling this method before main document resource is fetched is invalid. |
145 // This method should only be called once. | |
Kunihiko Sakamoto
2017/02/13 08:22:29
Now this can be called multiple times safely.
sunjian
2017/02/14 21:29:03
Done.
| |
145 ResourceTimingInfo* getNavigationTimingInfo(); | 146 ResourceTimingInfo* getNavigationTimingInfo(); |
146 | 147 |
147 // This is only exposed for testing purposes. | 148 // This is only exposed for testing purposes. |
148 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } | 149 HeapListHashSet<Member<Resource>>* preloads() { return m_preloads.get(); } |
149 | 150 |
150 // Workaround for https://crbug.com/666214. | 151 // Workaround for https://crbug.com/666214. |
151 // TODO(hiroshige): Remove this hack. | 152 // TODO(hiroshige): Remove this hack. |
152 void emulateLoadStartedForInspector(Resource*, | 153 void emulateLoadStartedForInspector(Resource*, |
153 const KURL&, | 154 const KURL&, |
154 WebURLRequest::RequestContext, | 155 WebURLRequest::RequestContext, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 | 224 |
224 HashSet<String> m_validatedURLs; | 225 HashSet<String> m_validatedURLs; |
225 mutable DocumentResourceMap m_documentResources; | 226 mutable DocumentResourceMap m_documentResources; |
226 | 227 |
227 Member<HeapListHashSet<Member<Resource>>> m_preloads; | 228 Member<HeapListHashSet<Member<Resource>>> m_preloads; |
228 Member<MHTMLArchive> m_archive; | 229 Member<MHTMLArchive> m_archive; |
229 | 230 |
230 TaskRunnerTimer<ResourceFetcher> m_resourceTimingReportTimer; | 231 TaskRunnerTimer<ResourceFetcher> m_resourceTimingReportTimer; |
231 | 232 |
232 using ResourceTimingInfoMap = | 233 using ResourceTimingInfoMap = |
233 HeapHashMap<Member<Resource>, std::unique_ptr<ResourceTimingInfo>>; | 234 HeapHashMap<Member<Resource>, RefPtr<ResourceTimingInfo>>; |
234 ResourceTimingInfoMap m_resourceTimingInfoMap; | 235 ResourceTimingInfoMap m_resourceTimingInfoMap; |
235 | 236 |
236 std::unique_ptr<ResourceTimingInfo> m_navigationTimingInfo; | 237 RefPtr<ResourceTimingInfo> m_navigationTimingInfo; |
237 | 238 |
238 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; | 239 Vector<RefPtr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
239 | 240 |
240 HeapHashSet<Member<ResourceLoader>> m_loaders; | 241 HeapHashSet<Member<ResourceLoader>> m_loaders; |
241 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; | 242 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; |
242 | 243 |
243 // Used in hit rate histograms. | 244 // Used in hit rate histograms. |
244 class DeadResourceStatsRecorder { | 245 class DeadResourceStatsRecorder { |
245 DISALLOW_NEW(); | 246 DISALLOW_NEW(); |
246 | 247 |
247 public: | 248 public: |
248 DeadResourceStatsRecorder(); | 249 DeadResourceStatsRecorder(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
284 } | 285 } |
285 | 286 |
286 private: | 287 private: |
287 Member<ResourceFetcher> m_loader; | 288 Member<ResourceFetcher> m_loader; |
288 bool m_previousState; | 289 bool m_previousState; |
289 }; | 290 }; |
290 | 291 |
291 } // namespace blink | 292 } // namespace blink |
292 | 293 |
293 #endif // ResourceFetcher_h | 294 #endif // ResourceFetcher_h |
OLD | NEW |