OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "core/html/HTMLFrameOwnerElement.h" | 42 #include "core/html/HTMLFrameOwnerElement.h" |
43 #include "core/html/imports/HTMLImportsController.h" | 43 #include "core/html/imports/HTMLImportsController.h" |
44 #include "core/inspector/ConsoleMessage.h" | 44 #include "core/inspector/ConsoleMessage.h" |
45 #include "core/inspector/InspectorInstrumentation.h" | 45 #include "core/inspector/InspectorInstrumentation.h" |
46 #include "core/inspector/InspectorTraceEvents.h" | 46 #include "core/inspector/InspectorTraceEvents.h" |
47 #include "core/loader/DocumentLoader.h" | 47 #include "core/loader/DocumentLoader.h" |
48 #include "core/loader/FrameLoader.h" | 48 #include "core/loader/FrameLoader.h" |
49 #include "core/loader/FrameLoaderClient.h" | 49 #include "core/loader/FrameLoaderClient.h" |
50 #include "core/loader/LinkLoader.h" | 50 #include "core/loader/LinkLoader.h" |
51 #include "core/loader/MixedContentChecker.h" | 51 #include "core/loader/MixedContentChecker.h" |
| 52 #include "core/loader/NetworkHintsInterface.h" |
52 #include "core/loader/PingLoader.h" | 53 #include "core/loader/PingLoader.h" |
53 #include "core/loader/ProgressTracker.h" | 54 #include "core/loader/ProgressTracker.h" |
54 #include "core/loader/appcache/ApplicationCacheHost.h" | 55 #include "core/loader/appcache/ApplicationCacheHost.h" |
55 #include "core/page/Page.h" | 56 #include "core/page/Page.h" |
56 #include "core/svg/graphics/SVGImageChromeClient.h" | 57 #include "core/svg/graphics/SVGImageChromeClient.h" |
57 #include "core/timing/DOMWindowPerformance.h" | 58 #include "core/timing/DOMWindowPerformance.h" |
58 #include "core/timing/Performance.h" | 59 #include "core/timing/Performance.h" |
59 #include "platform/Logging.h" | 60 #include "platform/Logging.h" |
60 #include "platform/network/ResourceTimingInfo.h" | 61 #include "platform/network/ResourceTimingInfo.h" |
61 #include "platform/weborigin/SchemeRegistry.h" | 62 #include "platform/weborigin/SchemeRegistry.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 } | 215 } |
215 | 216 |
216 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq
uest& request, const ResourceResponse& response) | 217 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq
uest& request, const ResourceResponse& response) |
217 { | 218 { |
218 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request,
response); | 219 frame()->loader().client()->dispatchDidLoadResourceFromMemoryCache(request,
response); |
219 } | 220 } |
220 | 221 |
221 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con
st ResourceResponse& response, ResourceLoader* resourceLoader) | 222 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con
st ResourceResponse& response, ResourceLoader* resourceLoader) |
222 { | 223 { |
223 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre
ss()); | 224 MixedContentChecker::checkMixedPrivatePublic(frame(), response.remoteIPAddre
ss()); |
224 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do
cument()); | 225 LinkLoader::loadLinkFromHeader(response.httpHeaderField("Link"), frame()->do
cument(), NetworkHintsInterfaceImpl()); |
225 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { | 226 if (m_documentLoader == frame()->loader().provisionalDocumentLoader()) { |
226 ResourceFetcher* fetcher = nullptr; | 227 ResourceFetcher* fetcher = nullptr; |
227 if (frame()->document()) | 228 if (frame()->document()) |
228 fetcher = frame()->document()->fetcher(); | 229 fetcher = frame()->document()->fetcher(); |
229 handleAcceptClientHintsHeader(response.httpHeaderField("accept-ch"), m_d
ocumentLoader->clientHintsPreferences(), fetcher); | 230 handleAcceptClientHintsHeader(response.httpHeaderField("accept-ch"), m_d
ocumentLoader->clientHintsPreferences(), fetcher); |
230 } | 231 } |
231 | 232 |
232 frame()->loader().progress().incrementProgress(identifier, response); | 233 frame()->loader().progress().incrementProgress(identifier, response); |
233 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide
ntifier, response); | 234 frame()->loader().client()->dispatchDidReceiveResponse(m_documentLoader, ide
ntifier, response); |
234 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E
VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame
(), response)); | 235 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceReceiveResponse", TRACE_E
VENT_SCOPE_THREAD, "data", InspectorReceiveResponseEvent::data(identifier, frame
(), response)); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 } | 663 } |
663 | 664 |
664 DEFINE_TRACE(FrameFetchContext) | 665 DEFINE_TRACE(FrameFetchContext) |
665 { | 666 { |
666 visitor->trace(m_document); | 667 visitor->trace(m_document); |
667 visitor->trace(m_documentLoader); | 668 visitor->trace(m_documentLoader); |
668 FetchContext::trace(visitor); | 669 FetchContext::trace(visitor); |
669 } | 670 } |
670 | 671 |
671 } // namespace blink | 672 } // namespace blink |
OLD | NEW |