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

Unified Diff: Source/core/inspector/InspectorTimelineAgent.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/InspectorTimelineAgent.h ('k') | Source/core/inspector/InspectorWorkerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 09db80d4f67f51487045cae4e615be43d1a3ce72..3c766c2d1dca6dd1ea8ee43e03b77536edfc08ba 100644
--- a/Source/core/inspector/InspectorTimelineAgent.cpp
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp
@@ -731,8 +731,13 @@ void InspectorTimelineAgent::didCompleteCurrentRecord(const String& type)
}
}
-InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorMemoryAgent* memoryAgent, InspectorDOMAgent* domAgent, InspectorCompositeState* state, InspectorType type, InspectorClient* client)
- : InspectorBaseAgent<InspectorTimelineAgent>("Timeline", instrumentingAgents, state)
+PassRefPtr<InspectorTimelineAgent> InspectorTimelineAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, PassRefPtr<InspectorMemoryAgent> memoryAgent, PassRefPtr<InspectorDOMAgent> domAgent, InspectorType type, InspectorClient* client)
+{
+ return adoptRef(new InspectorTimelineAgent(instrumentingAgents, state, pageAgent, memoryAgent, domAgent, type, client));
+}
+
+InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, PassRefPtr<InspectorMemoryAgent> memoryAgent, PassRefPtr<InspectorDOMAgent> domAgent, InspectorType type, InspectorClient* client)
+ : InspectorBaseAgent(instrumentingAgents, state)
, m_pageAgent(pageAgent)
, m_memoryAgent(memoryAgent)
, m_domAgent(domAgent)
@@ -829,5 +834,11 @@ Page* InspectorTimelineAgent::page()
return m_pageAgent ? m_pageAgent->page() : 0;
}
+InspectorTimelineFactory::InspectorTimelineFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InspectorMemoryFactory* memoryFactory, InspectorDOMFactory* domFactory, InspectorTimelineAgent::InspectorType type, InspectorClient* client)
+ : InspectorBaseFactory<InspectorTimelineFactory, InspectorTimelineAgent>("Timeline", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorTimelineAgent::create(m_instrumentingAgents, m_state, pageFactory ? pageFactory->agent() : 0, memoryFactory ? memoryFactory->agent() : 0, domFactory ? domFactory->agent() : 0, type, client));
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.h ('k') | Source/core/inspector/InspectorWorkerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698