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

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

Issue 1092123004: DevTools: remove dependency of most agents on InspectorPageAgent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixed debug build 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/PageRuntimeAgent.h ('k') | Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageRuntimeAgent.cpp
diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp
index 7bb1a3d26897f8a273baf545d17c6c0f90b1306b..7f811fe405e49b815a69c542e90943330c6b1ca4 100644
--- a/Source/core/inspector/PageRuntimeAgent.cpp
+++ b/Source/core/inspector/PageRuntimeAgent.cpp
@@ -40,7 +40,6 @@
#include "core/inspector/InjectedScript.h"
#include "core/inspector/InjectedScriptManager.h"
#include "core/inspector/InspectorIdentifiers.h"
-#include "core/inspector/InspectorPageAgent.h"
#include "core/inspector/InstrumentingAgents.h"
#include "core/page/Page.h"
#include "platform/weborigin/SecurityOrigin.h"
@@ -49,9 +48,9 @@ namespace blink {
static int s_nextDebuggerId = 1;
-PageRuntimeAgent::PageRuntimeAgent(InjectedScriptManager* injectedScriptManager, Client* client, ScriptDebugServer* scriptDebugServer, InspectorPageAgent* pageAgent)
+PageRuntimeAgent::PageRuntimeAgent(LocalFrame* inspectedFrame, InjectedScriptManager* injectedScriptManager, Client* client, ScriptDebugServer* scriptDebugServer)
: InspectorRuntimeAgent(injectedScriptManager, scriptDebugServer, client)
- , m_pageAgent(pageAgent)
+ , m_inspectedFrame(inspectedFrame)
, m_mainWorldContextCreated(false)
, m_debuggerId(s_nextDebuggerId++)
{
@@ -66,7 +65,7 @@ PageRuntimeAgent::~PageRuntimeAgent()
DEFINE_TRACE(PageRuntimeAgent)
{
- visitor->trace(m_pageAgent);
+ visitor->trace(m_inspectedFrame);
InspectorRuntimeAgent::trace(visitor);
}
@@ -130,7 +129,7 @@ void PageRuntimeAgent::willReleaseScriptContext(LocalFrame* frame, ScriptState*
InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString* errorString, const int* executionContextId)
{
if (!executionContextId) {
- ScriptState* scriptState = ScriptState::forMainWorld(m_pageAgent->inspectedFrame());
+ ScriptState* scriptState = ScriptState::forMainWorld(m_inspectedFrame);
InjectedScript result = injectedScriptManager()->injectedScriptFor(scriptState);
if (result.isEmpty())
*errorString = "Internal error: main world execution context not found.";
@@ -155,7 +154,7 @@ void PageRuntimeAgent::unmuteConsole()
void PageRuntimeAgent::reportExecutionContextCreation()
{
Vector<std::pair<ScriptState*, SecurityOrigin*> > isolatedContexts;
- for (Frame* frame = m_pageAgent->inspectedFrame(); frame; frame = frame->tree().traverseNext(m_pageAgent->inspectedFrame())) {
+ for (Frame* frame = m_inspectedFrame; frame; frame = frame->tree().traverseNext(m_inspectedFrame)) {
if (!frame->isLocalFrame())
continue;
LocalFrame* localFrame = toLocalFrame(frame);
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.h ('k') | Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698