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

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: 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/InspectorTimelineAgent.cpp
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp
index 09db80d4f67f51487045cae4e615be43d1a3ce72..dc4bc292083f5a358047cd22730e8727de51958c 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;
}
+InspectorTimelineController::InspectorTimelineController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InspectorMemoryController* memoryController, InspectorDOMController* domController, InspectorTimelineAgent::InspectorType type, InspectorClient* client)
+ : InspectorBaseController<InspectorTimelineController, InspectorTimelineAgent>("Timeline", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorTimelineAgent::create(m_instrumentingAgents, m_state, pageController ? pageController->getAgent() : 0, memoryController ? memoryController->getAgent() : 0, domController ? domController->getAgent() : 0, type, client));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698