OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 for (HTTPHeaderMap::const_iterator it = headers.begin(); it!= end; ++it) | 415 for (HTTPHeaderMap::const_iterator it = headers.begin(); it!= end; ++it) |
416 xhrReplayData->addHeader(it->key, it->value); | 416 xhrReplayData->addHeader(it->key, it->value); |
417 m_pendingXHRReplayData.set(client, xhrReplayData); | 417 m_pendingXHRReplayData.set(client, xhrReplayData); |
418 } | 418 } |
419 | 419 |
420 void InspectorResourceAgent::didFailXHRLoading(ThreadableLoaderClient* client) | 420 void InspectorResourceAgent::didFailXHRLoading(ThreadableLoaderClient* client) |
421 { | 421 { |
422 m_pendingXHRReplayData.remove(client); | 422 m_pendingXHRReplayData.remove(client); |
423 } | 423 } |
424 | 424 |
425 void InspectorResourceAgent::didFinishXHRLoading(ThreadableLoaderClient* client,
unsigned long identifier, const String& sourceString, const String&, const Stri
ng&, unsigned) | 425 void InspectorResourceAgent::didFinishXHRLoading(ThreadableLoaderClient* client,
unsigned long identifier, ScriptString sourceString, const String&, const Strin
g&, unsigned) |
426 { | 426 { |
427 // For Asynchronous XHRs, the inspector can grab the data directly off of th
e CachedResource. For sync XHRs, we need to | 427 // For Asynchronous XHRs, the inspector can grab the data directly off of th
e CachedResource. For sync XHRs, we need to |
428 // provide the data here, since no CachedResource was involved. | 428 // provide the data here, since no CachedResource was involved. |
429 if (m_loadingXHRSynchronously) | 429 if (m_loadingXHRSynchronously) |
430 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identi
fier), sourceString); | 430 m_resourcesData->setResourceContent(IdentifiersFactory::requestId(identi
fier), sourceString.toString()); |
431 m_pendingXHRReplayData.remove(client); | 431 m_pendingXHRReplayData.remove(client); |
432 } | 432 } |
433 | 433 |
434 void InspectorResourceAgent::didReceiveXHRResponse(unsigned long identifier) | 434 void InspectorResourceAgent::didReceiveXHRResponse(unsigned long identifier) |
435 { | 435 { |
436 m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier),
InspectorPageAgent::XHRResource); | 436 m_resourcesData->setResourceType(IdentifiersFactory::requestId(identifier),
InspectorPageAgent::XHRResource); |
437 } | 437 } |
438 | 438 |
439 void InspectorResourceAgent::willLoadXHRSynchronously() | 439 void InspectorResourceAgent::willLoadXHRSynchronously() |
440 { | 440 { |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 , m_client(client) | 748 , m_client(client) |
749 , m_frontend(0) | 749 , m_frontend(0) |
750 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 750 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
751 , m_loadingXHRSynchronously(false) | 751 , m_loadingXHRSynchronously(false) |
752 , m_isRecalculatingStyle(false) | 752 , m_isRecalculatingStyle(false) |
753 { | 753 { |
754 } | 754 } |
755 | 755 |
756 } // namespace WebCore | 756 } // namespace WebCore |
757 | 757 |
OLD | NEW |