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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens
ureLoader(loader), r, resourceLoader); | 128 InspectorInstrumentation::didReceiveResourceResponse(cookie, identifier, ens
ureLoader(loader), r, resourceLoader); |
129 } | 129 } |
130 | 130 |
131 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) |
132 { | 132 { |
133 if (Page* page = m_frame->page()) | 133 if (Page* page = m_frame->page()) |
134 page->progress().incrementProgress(identifier, data, dataLength); | 134 page->progress().incrementProgress(identifier, data, dataLength); |
135 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); | 135 InspectorInstrumentation::didReceiveData(m_frame, identifier, data, dataLeng
th, encodedDataLength); |
136 } | 136 } |
137 | 137 |
| 138 void FrameFetchContext::dispatchDidDownloadData(DocumentLoader*, unsigned long i
dentifier, int dataLength, int encodedDataLength) |
| 139 { |
| 140 if (Page* page = m_frame->page()) |
| 141 page->progress().incrementProgress(identifier, 0, dataLength); |
| 142 InspectorInstrumentation::didReceiveData(m_frame, identifier, 0, dataLength,
encodedDataLength); |
| 143 } |
| 144 |
138 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime) | 145 void FrameFetchContext::dispatchDidFinishLoading(DocumentLoader* loader, unsigne
d long identifier, double finishTime) |
139 { | 146 { |
140 if (Page* page = m_frame->page()) | 147 if (Page* page = m_frame->page()) |
141 page->progress().completeProgress(identifier); | 148 page->progress().completeProgress(identifier); |
142 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); | 149 m_frame->loader().client()->dispatchDidFinishLoading(loader, identifier); |
143 | 150 |
144 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime); | 151 InspectorInstrumentation::didFinishLoading(m_frame, identifier, ensureLoader
(loader), finishTime); |
145 } | 152 } |
146 | 153 |
147 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error) | 154 void FrameFetchContext::dispatchDidFail(DocumentLoader* loader, unsigned long id
entifier, const ResourceError& error) |
(...skipping 11 matching lines...) Expand all Loading... |
159 if (dataLength > 0) | 166 if (dataLength > 0) |
160 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt
h, encodedDataLength); | 167 dispatchDidReceiveData(ensureLoader(loader), identifier, data, dataLengt
h, encodedDataLength); |
161 | 168 |
162 if (error.isNull()) | 169 if (error.isNull()) |
163 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); | 170 dispatchDidFinishLoading(ensureLoader(loader), identifier, 0); |
164 else | 171 else |
165 dispatchDidFail(ensureLoader(loader), identifier, error); | 172 dispatchDidFail(ensureLoader(loader), identifier, error); |
166 } | 173 } |
167 | 174 |
168 } // namespace WebCore | 175 } // namespace WebCore |
OLD | NEW |