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

Unified Diff: Source/core/inspector/InspectorDOMAgent.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/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 2d703efc95d9dd16918db5a7355a70db916c0284..9ff658d8f9496321b60ea242994e7e1c95779ee6 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -221,8 +221,13 @@ String InspectorDOMAgent::toErrorString(const ExceptionCode& ec)
return "";
}
-InspectorDOMAgent::InspectorDOMAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* inspectorState, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
- : InspectorBaseAgent<InspectorDOMAgent>("DOM", instrumentingAgents, inspectorState)
+PassRefPtr<InspectorDOMAgent> InspectorDOMAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
+{
+ return adoptRef(new InspectorDOMAgent(instrumentingAgents, inspectorState, pageAgent, injectedScriptManager, overlay, client));
+}
+
+InspectorDOMAgent::InspectorDOMAgent(InstrumentingAgents* instrumentingAgents, InspectorState* inspectorState, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
+ : InspectorBaseAgent(instrumentingAgents, inspectorState)
, m_pageAgent(pageAgent)
, m_injectedScriptManager(injectedScriptManager)
, m_overlay(overlay)
@@ -1831,5 +1836,11 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(No
return injectedScript.wrapNode(node, objectGroup);
}
+InspectorDOMController::InspectorDOMController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
+ : InspectorBaseController<InspectorDOMController, InspectorDOMAgent>("DOM", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorDOMAgent::create(m_instrumentingAgents, m_state, pageController->getAgent(), injectedScriptManager, overlay, client));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698