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 ResourceTimingInfo* getNavigationTimingInfo(); | 145 // This method should only be called once. |
| 146 std::unique_ptr<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, |
155 const AtomicString& initiatorName); | 156 const AtomicString& initiatorName); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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>, std::unique_ptr<ResourceTimingInfo>>; |
234 ResourceTimingInfoMap m_resourceTimingInfoMap; | 235 ResourceTimingInfoMap m_resourceTimingInfoMap; |
235 | 236 |
236 std::unique_ptr<ResourceTimingInfo> m_navigationTimingInfo; | 237 std::unique_ptr<ResourceTimingInfo> m_navigationTimingInfo; |
| 238 ResourceTimingInfo* m_navigationTimingInfoRef; |
237 | 239 |
238 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; | 240 Vector<std::unique_ptr<ResourceTimingInfo>> m_scheduledResourceTimingReports; |
239 | 241 |
240 HeapHashSet<Member<ResourceLoader>> m_loaders; | 242 HeapHashSet<Member<ResourceLoader>> m_loaders; |
241 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; | 243 HeapHashSet<Member<ResourceLoader>> m_nonBlockingLoaders; |
242 | 244 |
243 // Used in hit rate histograms. | 245 // Used in hit rate histograms. |
244 class DeadResourceStatsRecorder { | 246 class DeadResourceStatsRecorder { |
245 DISALLOW_NEW(); | 247 DISALLOW_NEW(); |
246 | 248 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 } | 286 } |
285 | 287 |
286 private: | 288 private: |
287 Member<ResourceFetcher> m_loader; | 289 Member<ResourceFetcher> m_loader; |
288 bool m_previousState; | 290 bool m_previousState; |
289 }; | 291 }; |
290 | 292 |
291 } // namespace blink | 293 } // namespace blink |
292 | 294 |
293 #endif // ResourceFetcher_h | 295 #endif // ResourceFetcher_h |
OLD | NEW |