| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // FIXME(http://crbug.com/274173): | 134 // FIXME(http://crbug.com/274173): |
| 135 // |loader| can be null if the resource is loaded from imported document. | 135 // |loader| can be null if the resource is loaded from imported document. |
| 136 // This means inspector, which uses DocumentLoader as an grouping entity, | 136 // This means inspector, which uses DocumentLoader as an grouping entity, |
| 137 // cannot see imported documents. | 137 // cannot see imported documents. |
| 138 inline DocumentLoader* FrameFetchContext::ensureLoader(DocumentLoader* loader) | 138 inline DocumentLoader* FrameFetchContext::ensureLoader(DocumentLoader* loader) |
| 139 { | 139 { |
| 140 return loader ? loader : m_frame->loader().documentLoader(); | 140 return loader ? loader : m_frame->loader().documentLoader(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority) | 143 void FrameFetchContext::dispatchDidChangeResourcePriority(unsigned long identifi
er, ResourceLoadPriority loadPriority, int intraPriorityValue) |
| 144 { | 144 { |
| 145 m_frame->loader().client()->dispatchDidChangeResourcePriority(identifier, lo
adPriority); | 145 m_frame->loader().client()->dispatchDidChangeResourcePriority(identifier, lo
adPriority, intraPriorityValue); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void FrameFetchContext::dispatchWillSendRequest(DocumentLoader* loader, unsigned
long identifier, ResourceRequest& request, const ResourceResponse& redirectResp
onse, const FetchInitiatorInfo& initiatorInfo) | 148 void FrameFetchContext::dispatchWillSendRequest(DocumentLoader* loader, unsigned
long identifier, ResourceRequest& request, const ResourceResponse& redirectResp
onse, const FetchInitiatorInfo& initiatorInfo) |
| 149 { | 149 { |
| 150 m_frame->loader().applyUserAgent(request); | 150 m_frame->loader().applyUserAgent(request); |
| 151 m_frame->loader().client()->dispatchWillSendRequest(loader, identifier, requ
est, redirectResponse); | 151 m_frame->loader().client()->dispatchWillSendRequest(loader, identifier, requ
est, redirectResponse); |
| 152 InspectorInstrumentation::willSendRequest(m_frame, identifier, ensureLoader(
loader), request, redirectResponse, initiatorInfo); | 152 InspectorInstrumentation::willSendRequest(m_frame, identifier, ensureLoader(
loader), request, redirectResponse, initiatorInfo); |
| 153 } | 153 } |
| 154 | 154 |
| 155 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq
uest& request, const ResourceResponse& response) | 155 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq
uest& request, const ResourceResponse& response) |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (!response.isNull()) | 200 if (!response.isNull()) |
| 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); | 201 dispatchDidReceiveResponse(ensureLoader(loader), identifier, response); |
| 202 | 202 |
| 203 if (dataLength > 0) | 203 if (dataLength > 0) |
| 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); | 204 dispatchDidReceiveData(ensureLoader(loader), identifier, 0, dataLength,
0); |
| 205 | 205 |
| 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); | 206 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); |
| 207 } | 207 } |
| 208 | 208 |
| 209 } // namespace WebCore | 209 } // namespace WebCore |
| OLD | NEW |