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

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

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments Created 7 years, 6 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/core/inspector/WorkerConsoleAgent.h » ('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 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
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.h ('k') | Source/core/inspector/WorkerConsoleAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698