| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 | 312 |
| 313 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority, int intraPriorityValue) | 313 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority, int intraPriorityValue) |
| 314 { | 314 { |
| 315 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceChangePriority", TRACE_EV
ENT_SCOPE_THREAD, "data", InspectorChangeResourcePriorityEvent::data(identifier,
loadPriority)); | 315 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceChangePriority", TRACE_EV
ENT_SCOPE_THREAD, "data", InspectorChangeResourcePriorityEvent::data(identifier,
loadPriority)); |
| 316 InspectorInstrumentation::didChangeResourcePriority(frame(), identifier, loa
dPriority); | 316 InspectorInstrumentation::didChangeResourcePriority(frame(), identifier, loa
dPriority); |
| 317 } | 317 } |
| 318 | 318 |
| 319 void FrameFetchContext::prepareRequest(ResourceRequest& request) | 319 void FrameFetchContext::prepareRequest(ResourceRequest& request) |
| 320 { | 320 { |
| 321 frame()->loader().applyUserAgent(request); | 321 frame()->loader().applyUserAgent(request); |
| 322 frame()->loader().client()->dispatchWillSendRequest(request); | |
| 323 } | 322 } |
| 324 | 323 |
| 325 void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour
ceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiat
orInfo& initiatorInfo) | 324 void FrameFetchContext::dispatchWillSendRequest(unsigned long identifier, Resour
ceRequest& request, const ResourceResponse& redirectResponse, const FetchInitiat
orInfo& initiatorInfo) |
| 326 { | 325 { |
| 327 // For initial requests, prepareRequest() is called in | 326 // For initial requests, prepareRequest() is called in |
| 328 // willStartLoadingResource(), before revalidation policy is determined. | 327 // willStartLoadingResource(), before revalidation policy is determined. |
| 329 // That call doesn't exist for redirects, so call preareRequest() here. | 328 // That call doesn't exist for redirects, so call preareRequest() here. |
| 330 if (!redirectResponse.isNull()) | 329 if (!redirectResponse.isNull()) |
| 331 prepareRequest(request); | 330 prepareRequest(request); |
| 332 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceSendRequest", TRACE_EVENT
_SCOPE_THREAD, "data", InspectorSendRequestEvent::data(identifier, frame(), requ
est)); | 331 TRACE_EVENT_INSTANT1("devtools.timeline", "ResourceSendRequest", TRACE_EVENT
_SCOPE_THREAD, "data", InspectorSendRequestEvent::data(identifier, frame(), requ
est)); |
| 332 frame()->loader().client()->dispatchWillSendRequest(request); |
| 333 InspectorInstrumentation::willSendRequest(frame(), identifier, masterDocumen
tLoader(), request, redirectResponse, initiatorInfo); | 333 InspectorInstrumentation::willSendRequest(frame(), identifier, masterDocumen
tLoader(), request, redirectResponse, initiatorInfo); |
| 334 if (frame()->frameScheduler()) | 334 if (frame()->frameScheduler()) |
| 335 frame()->frameScheduler()->didStartLoading(identifier); | 335 frame()->frameScheduler()->didStartLoading(identifier); |
| 336 } | 336 } |
| 337 | 337 |
| 338 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con
st ResourceResponse& response, WebURLRequest::FrameType frameType, WebURLRequest
::RequestContext requestContext, Resource* resource) | 338 void FrameFetchContext::dispatchDidReceiveResponse(unsigned long identifier, con
st ResourceResponse& response, WebURLRequest::FrameType frameType, WebURLRequest
::RequestContext requestContext, Resource* resource) |
| 339 { | 339 { |
| 340 dispatchDidReceiveResponseInternal(identifier, response, frameType, requestC
ontext, resource, LinkLoader::LoadResourcesAndPreconnect); | 340 dispatchDidReceiveResponseInternal(identifier, response, frameType, requestC
ontext, resource, LinkLoader::LoadResourcesAndPreconnect); |
| 341 } | 341 } |
| 342 | 342 |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 } | 799 } |
| 800 | 800 |
| 801 DEFINE_TRACE(FrameFetchContext) | 801 DEFINE_TRACE(FrameFetchContext) |
| 802 { | 802 { |
| 803 visitor->trace(m_document); | 803 visitor->trace(m_document); |
| 804 visitor->trace(m_documentLoader); | 804 visitor->trace(m_documentLoader); |
| 805 FetchContext::trace(visitor); | 805 FetchContext::trace(visitor); |
| 806 } | 806 } |
| 807 | 807 |
| 808 } // namespace blink | 808 } // namespace blink |
| OLD | NEW |