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

Unified Diff: Source/core/inspector/PageDebuggerAgent.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/PageDebuggerAgent.h ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index 72bd983efa425e8384062f4341f8320a1a9c427d..7abd7b2b846df248fea35b92c0a7c35ce38b6eb6 100644
--- a/Source/core/inspector/PageDebuggerAgent.cpp
+++ b/Source/core/inspector/PageDebuggerAgent.cpp
@@ -41,12 +41,12 @@
namespace WebCore {
-PassOwnPtr<PageDebuggerAgent> PageDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+PassRefPtr<PageDebuggerAgent> PageDebuggerAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, PageScriptDebugServer* pageScriptDebugServer, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
{
- return adoptPtr(new PageDebuggerAgent(instrumentingAgents, inspectorState, pageScriptDebugServer, pageAgent, injectedScriptManager, overlay));
+ return adoptRef(new PageDebuggerAgent(instrumentingAgents, inspectorState, pageScriptDebugServer, pageAgent, injectedScriptManager, overlay));
}
-PageDebuggerAgent::PageDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* inspectorState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageAgent* pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+PageDebuggerAgent::PageDebuggerAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, PageScriptDebugServer* pageScriptDebugServer, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
: InspectorDebuggerAgent(instrumentingAgents, inspectorState, injectedScriptManager)
, m_pageScriptDebugServer(pageScriptDebugServer)
, m_pageAgent(pageAgent)
@@ -139,5 +139,11 @@ void PageDebuggerAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorl
scriptDebugServer().setScriptPreprocessor(m_pageAgent->scriptPreprocessor());
}
+PageDebuggerFactory::PageDebuggerFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+ : InspectorDebuggerFactory(instrumentingAgents, compositeState)
+{
+ setAgent(PageDebuggerAgent::create(m_instrumentingAgents, m_state, pageScriptDebugServer, pageFactory->agent(), injectedScriptManager, overlay));
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/PageDebuggerAgent.h ('k') | Source/core/inspector/PageRuntimeAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698