Index: Source/core/inspector/PageRuntimeAgent.cpp |
diff --git a/Source/core/inspector/PageRuntimeAgent.cpp b/Source/core/inspector/PageRuntimeAgent.cpp |
index c6e81e5e446df4a218d40de6f29b1fc639d78474..d062aecda161d8d15dafb8f9902807440ba825d7 100644 |
--- a/Source/core/inspector/PageRuntimeAgent.cpp |
+++ b/Source/core/inspector/PageRuntimeAgent.cpp |
@@ -51,7 +51,12 @@ namespace PageRuntimeAgentState { |
static const char runtimeEnabled[] = "runtimeEnabled"; |
}; |
-PageRuntimeAgent::PageRuntimeAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, Page* page, InspectorPageAgent* pageAgent) |
+PassRefPtr<PageRuntimeAgent> PageRuntimeAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer) |
+{ |
+ return adoptRef(new PageRuntimeAgent(instrumentingAgents, state, page, pageAgent, injectedScriptManager, scriptDebugServer)); |
+} |
+ |
+PageRuntimeAgent::PageRuntimeAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, Page* page, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer) |
: InspectorRuntimeAgent(instrumentingAgents, state, injectedScriptManager, scriptDebugServer) |
, m_inspectedPage(page) |
, m_pageAgent(pageAgent) |
@@ -190,5 +195,11 @@ void PageRuntimeAgent::notifyContextCreated(const String& frameId, ScriptState* |
.release()); |
} |
+PageRuntimeFactory::PageRuntimeFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, Page* page, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer) |
+ : InspectorRuntimeFactory(instrumentingAgents, compositeState) |
+{ |
+ setAgent(PageRuntimeAgent::create(m_instrumentingAgents, m_state, page, pageFactory->agent(), injectedScriptManager, scriptDebugServer)); |
+} |
+ |
} // namespace WebCore |