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 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1180 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data,
int dataLength, int encodedDataLength, const ResourceLoaderOptions& options) | 1180 void ResourceFetcher::didReceiveData(const Resource* resource, const char* data,
int dataLength, int encodedDataLength, const ResourceLoaderOptions& options) |
1181 { | 1181 { |
1182 // FIXME: use frame of master document for imported documents. | 1182 // FIXME: use frame of master document for imported documents. |
1183 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); | 1183 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); |
1184 if (options.sendLoadCallbacks != SendCallbacks) | 1184 if (options.sendLoadCallbacks != SendCallbacks) |
1185 return; | 1185 return; |
1186 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); | 1186 context().dispatchDidReceiveData(m_documentLoader, resource->identifier(), d
ata, dataLength, encodedDataLength); |
1187 InspectorInstrumentation::didReceiveResourceData(cookie); | 1187 InspectorInstrumentation::didReceiveResourceData(cookie); |
1188 } | 1188 } |
1189 | 1189 |
| 1190 void ResourceFetcher::didDownloadData(const Resource* resource, int dataLength,
int encodedDataLength, const ResourceLoaderOptions& options) |
| 1191 { |
| 1192 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willReceiv
eResourceData(frame(), resource->identifier(), encodedDataLength); |
| 1193 if (options.sendLoadCallbacks != SendCallbacks) |
| 1194 return; |
| 1195 context().dispatchDidDownloadData(m_documentLoader, resource->identifier(),
dataLength, encodedDataLength); |
| 1196 InspectorInstrumentation::didReceiveResourceData(cookie); |
| 1197 } |
| 1198 |
1190 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) | 1199 void ResourceFetcher::subresourceLoaderFinishedLoadingOnePart(ResourceLoader* lo
ader) |
1191 { | 1200 { |
1192 if (m_multipartLoaders) | 1201 if (m_multipartLoaders) |
1193 m_multipartLoaders->add(loader); | 1202 m_multipartLoaders->add(loader); |
1194 if (m_loaders) | 1203 if (m_loaders) |
1195 m_loaders->remove(loader); | 1204 m_loaders->remove(loader); |
1196 if (Frame* frame = this->frame()) | 1205 if (Frame* frame = this->frame()) |
1197 return frame->loader().checkLoadComplete(m_documentLoader); | 1206 return frame->loader().checkLoadComplete(m_documentLoader); |
1198 } | 1207 } |
1199 | 1208 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 } | 1330 } |
1322 #endif | 1331 #endif |
1323 | 1332 |
1324 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1333 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
1325 { | 1334 { |
1326 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul
tOriginRestrictionsForType, DocumentContext)); | 1335 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon
tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF
orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul
tOriginRestrictionsForType, DocumentContext)); |
1327 return options; | 1336 return options; |
1328 } | 1337 } |
1329 | 1338 |
1330 } | 1339 } |
OLD | NEW |