| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 m_frame->loader()->client()->dispatchDidChangeResourcePriority(identifier, l
oadPriority); | 107 m_frame->loader()->client()->dispatchDidChangeResourcePriority(identifier, l
oadPriority); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void FrameFetchContext::dispatchWillSendRequest(DocumentLoader* loader, unsigned
long identifier, ResourceRequest& request, const ResourceResponse& redirectResp
onse, const FetchInitiatorInfo& initiatorInfo) | 110 void FrameFetchContext::dispatchWillSendRequest(DocumentLoader* loader, unsigned
long identifier, ResourceRequest& request, const ResourceResponse& redirectResp
onse, const FetchInitiatorInfo& initiatorInfo) |
| 111 { | 111 { |
| 112 m_frame->loader()->applyUserAgent(request); | 112 m_frame->loader()->applyUserAgent(request); |
| 113 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); | 113 m_frame->loader()->client()->dispatchWillSendRequest(loader, identifier, req
uest, redirectResponse); |
| 114 InspectorInstrumentation::willSendRequest(m_frame, identifier, ensureLoader(
loader), request, redirectResponse, initiatorInfo); | 114 InspectorInstrumentation::willSendRequest(m_frame, identifier, ensureLoader(
loader), request, redirectResponse, initiatorInfo); |
| 115 } | 115 } |
| 116 | 116 |
| 117 void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(const ResourceReq
uest& request, const ResourceResponse& response) |
| 118 { |
| 119 m_frame->loader()->client()->dispatchDidLoadResourceFromMemoryCache(request,
response); |
| 120 } |
| 121 |
| 117 void FrameFetchContext::dispatchDidReceiveResponse(DocumentLoader* loader, unsig
ned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader) | 122 void FrameFetchContext::dispatchDidReceiveResponse(DocumentLoader* loader, unsig
ned long identifier, const ResourceResponse& r, ResourceLoader* resourceLoader) |
| 118 { | 123 { |
| 119 if (Page* page = m_frame->page()) | 124 if (Page* page = m_frame->page()) |
| 120 page->progress().incrementProgress(identifier, r); | 125 page->progress().incrementProgress(identifier, r); |
| 121 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); | 126 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceResponse(m_frame, identifier, r); |
| 122 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); | 127 m_frame->loader()->client()->dispatchDidReceiveResponse(loader, identifier,
r); |
| 123 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens
ureLoader(loader), r, resourceLoader); | 128 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens
ureLoader(loader), r, resourceLoader); |
| 124 } | 129 } |
| 125 | 130 |
| 126 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id
entifier, const char* data, int dataLength, int encodedDataLength) | 131 void FrameFetchContext::dispatchDidReceiveData(DocumentLoader*, unsigned long id
entifier, const char* data, int dataLength, int encodedDataLength) |
| (...skipping 27 matching lines...) Expand all Loading... |
| 154 if (dataLength > 0) | 159 if (dataLength > 0) |
| 155 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt
h, encodedDataLength); | 160 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt
h, encodedDataLength); |
| 156 | 161 |
| 157 if (error.isNull()) | 162 if (error.isNull()) |
| 158 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); | 163 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); |
| 159 else | 164 else |
| 160 dispatchDidFail(ensureLoader(loader), identifier, error); | 165 dispatchDidFail(ensureLoader(loader), identifier, error); |
| 161 } | 166 } |
| 162 | 167 |
| 163 } // namespace WebCore | 168 } // namespace WebCore |
| OLD | NEW |