Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Unified Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 1118963002: Revert of DevTools: remove dependency of most agents on InspectorPageAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/core/inspector/InspectorTracingAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index 52b5aa18d293847699bfbb421a6ba5767ea1f948..2488f294087110d5d56c6d6a6793b99dff947b7e 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -52,7 +52,6 @@
#include "core/inspector/InspectorIdentifiers.h"
#include "core/inspector/InspectorOverlay.h"
#include "core/inspector/InspectorPageAgent.h"
-#include "core/inspector/InspectorResolver.h"
#include "core/inspector/InspectorState.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/inspector/NetworkResourcesData.h"
@@ -309,7 +308,7 @@
DEFINE_TRACE(InspectorResourceAgent)
{
- visitor->trace(m_inspectedFrame);
+ visitor->trace(m_pageAgent);
#if ENABLE(OILPAN)
visitor->trace(m_pendingXHRReplayData);
visitor->trace(m_replayXHRs);
@@ -544,7 +543,7 @@
String message = "XHR finished loading: " + method + " \"" + url + "\".";
RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(NetworkMessageSource, DebugMessageLevel, message);
consoleMessage->setRequestIdentifier(identifier);
- m_inspectedFrame->host()->consoleMessageStorage().reportMessage(context, consoleMessage.release());
+ m_pageAgent->frameHost()->consoleMessageStorage().reportMessage(context, consoleMessage.release());
}
}
@@ -736,7 +735,7 @@
if (!resourceData)
return false;
if (BlobDataHandle* blob = resourceData->downloadedFileBlob()) {
- if (LocalFrame* frame = InspectorResolver::resolveFrame(m_inspectedFrame, resourceData->frameId())) {
+ if (LocalFrame* frame = m_pageAgent->frameForId(resourceData->frameId())) {
if (Document* document = frame->document()) {
InspectorFileReaderLoaderClient* client = new InspectorFileReaderLoaderClient(blob, InspectorPageAgent::createResourceTextDecoder(resourceData->mimeType(), resourceData->textEncodingName()), callback);
client->start(document);
@@ -842,7 +841,7 @@
m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
if (cacheDisabled)
memoryCache()->evictResources();
- for (Frame* frame = m_inspectedFrame; frame; frame = frame->tree().traverseNext(m_inspectedFrame)) {
+ for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext()) {
if (frame->isLocalFrame())
toLocalFrame(frame)->document()->fetcher()->garbageCollectDocumentResources();
}
@@ -859,7 +858,7 @@
void InspectorResourceAgent::didCommitLoad(LocalFrame* frame, DocumentLoader* loader)
{
- if (loader->frame() != m_inspectedFrame)
+ if (loader->frame() != m_pageAgent->inspectedFrame())
return;
if (m_state->getBoolean(ResourceAgentState::cacheDisabled))
@@ -909,9 +908,9 @@
m_replayXHRsToBeDeleted.clear();
}
-InspectorResourceAgent::InspectorResourceAgent(LocalFrame* inspectedFrame)
+InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent)
: InspectorBaseAgent<InspectorResourceAgent, InspectorFrontend::Network>("Network")
- , m_inspectedFrame(inspectedFrame)
+ , m_pageAgent(pageAgent)
, m_resourcesData(adoptPtr(new NetworkResourcesData()))
, m_pendingEventSource(nullptr)
, m_isRecalculatingStyle(false)
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/core/inspector/InspectorTracingAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698