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

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: Made InspectorBaseAgent RefCounted 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
Index: Source/core/inspector/PageDebuggerAgent.cpp
diff --git a/Source/core/inspector/PageDebuggerAgent.cpp b/Source/core/inspector/PageDebuggerAgent.cpp
index 72bd983efa425e8384062f4341f8320a1a9c427d..a261167b9c3a7baa2c1166a6a5afdf3748da8799 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());
}
+PageDebuggerController::PageDebuggerController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+ : InspectorDebuggerController(instrumentingAgents, compositeState)
+{
+ setAgent(PageDebuggerAgent::create(m_instrumentingAgents, m_state, pageScriptDebugServer, pageController->getAgent(), injectedScriptManager, overlay));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698