OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data,
int dataLength, int encodedDataLength, const ResourceLoaderOptions& options) | 1179 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data,
int dataLength, int encodedDataLength, const ResourceLoaderOptions& options) |
1180 { | 1180 { |
1181 // FIXME: use frame of master document for imported documents. | 1181 // FIXME: use frame of master document for imported documents. |
1182 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); | 1182 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); |
1183 if (options.sendLoadCallbacks != SendCallbacks) | 1183 if (options.sendLoadCallbacks != SendCallbacks) |
1184 return; | 1184 return; |
1185 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); | 1185 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); |
1186 InspectorInstrumentation::didReceiveResourceData(cookie); | 1186 InspectorInstrumentation::didReceiveResourceData(cookie); |
1187 } | 1187 } |
1188 | 1188 |
| 1189 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength,
int encodedDataLength, const ResourceLoaderOptions& options) |
| 1190 { |
| 1191 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); |
| 1192 if (options.sendLoadCallbacks != SendCallbacks) |
| 1193 return; |
| 1194 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(),
dataLength, encodedDataLength); |
| 1195 InspectorInstrumentation::didReceiveResourceData(cookie); |
| 1196 } |
| 1197 |
1189 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) | 1198 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) |
1190 { | 1199 { |
1191 if (m_multipartLoaders) | 1200 if (m_multipartLoaders) |
1192 m_multipartLoaders->add(loader); | 1201 m_multipartLoaders->add(loader); |
1193 if (m_loaders) | 1202 if (m_loaders) |
1194 m_loaders->remove(loader); | 1203 m_loaders->remove(loader); |
1195 if (Frame* frame = this->frame()) | 1204 if (Frame* frame = this->frame()) |
1196 return frame->loader().checkLoadComplete(m_documentLoader); | 1205 return frame->loader().checkLoadComplete(m_documentLoader); |
1197 } | 1206 } |
1198 | 1207 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 } | 1329 } |
1321 #endif | 1330 #endif |
1322 | 1331 |
1323 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1332 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
1324 { | 1333 { |
1325 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC
ontext)); | 1334 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, DocumentC
ontext)); |
1326 return options; | 1335 return options; |
1327 } | 1336 } |
1328 | 1337 |
1329 } | 1338 } |
OLD | NEW |