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

Unified Diff: Source/core/inspector/PageConsoleAgent.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/PageConsoleAgent.h ('k') | Source/core/inspector/PageDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageConsoleAgent.cpp
diff --git a/Source/core/inspector/PageConsoleAgent.cpp b/Source/core/inspector/PageConsoleAgent.cpp
index 03a6b845265fbdd3f1b2eb7884d8b42435443d45..3f5b4d3a4b471b01c3fa732c7cd4ab9aca7b7bd8 100644
--- a/Source/core/inspector/PageConsoleAgent.cpp
+++ b/Source/core/inspector/PageConsoleAgent.cpp
@@ -38,16 +38,17 @@
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/ConsoleMessageStorage.h"
#include "core/inspector/InspectorDOMAgent.h"
+#include "core/inspector/InspectorPageAgent.h"
#include "core/workers/WorkerInspectorProxy.h"
namespace blink {
int PageConsoleAgent::s_enabledAgentCount = 0;
-PageConsoleAgent::PageConsoleAgent(LocalFrame* inspectedFrame, InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent)
+PageConsoleAgent::PageConsoleAgent(InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent, InspectorPageAgent* pageAgent)
: InspectorConsoleAgent(injectedScriptManager)
- , m_inspectedFrame(inspectedFrame)
, m_inspectorDOMAgent(domAgent)
+ , m_pageAgent(pageAgent)
{
}
@@ -61,8 +62,8 @@
DEFINE_TRACE(PageConsoleAgent)
{
- visitor->trace(m_inspectedFrame);
visitor->trace(m_inspectorDOMAgent);
+ visitor->trace(m_pageAgent);
InspectorConsoleAgent::trace(visitor);
}
@@ -82,7 +83,7 @@
void PageConsoleAgent::clearMessages(ErrorString* errorString)
{
m_inspectorDOMAgent->releaseDanglingNodes();
- messageStorage()->clear(m_inspectedFrame->document());
+ messageStorage()->clear(m_pageAgent->inspectedFrame()->document());
}
void PageConsoleAgent::workerConsoleAgentEnabled(WorkerGlobalScopeProxy* proxy)
@@ -92,7 +93,7 @@
ConsoleMessageStorage* PageConsoleAgent::messageStorage()
{
- return &m_inspectedFrame->host()->consoleMessageStorage();
+ return &m_pageAgent->frameHost()->consoleMessageStorage();
}
void PageConsoleAgent::workerTerminated(WorkerInspectorProxy* workerInspectorProxy)
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.h ('k') | Source/core/inspector/PageDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698