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

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: 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/InspectorDOMAgent.h ('k') | Source/core/inspector/InspectorDOMDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 16de128eee8d2786f55fb70e109150c8ea326087..69ac404060f23b1770a6f742a6d398a57ceb54de 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)
@@ -1836,5 +1841,11 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(No
return injectedScript.wrapNode(node, objectGroup);
}
+InspectorDOMFactory::InspectorDOMFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client)
+ : InspectorBaseFactory<InspectorDOMFactory, InspectorDOMAgent>("DOM", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorDOMAgent::create(m_instrumentingAgents, m_state, pageFactory->agent(), injectedScriptManager, overlay, client));
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/inspector/InspectorDOMDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698