Index: Source/core/inspector/InspectorTimelineAgent.h |
diff --git a/Source/core/inspector/InspectorTimelineAgent.h b/Source/core/inspector/InspectorTimelineAgent.h |
index 2a35c564af61f63532e53df55646dbdfc7e856da..16e536e15e36acc5f8770618074eefe0bd0038be 100644 |
--- a/Source/core/inspector/InspectorTimelineAgent.h |
+++ b/Source/core/inspector/InspectorTimelineAgent.h |
@@ -55,9 +55,12 @@ class Frame; |
class GraphicsContext; |
class InspectorClient; |
class InspectorDOMAgent; |
+class InspectorDOMFactory; |
class InspectorFrontend; |
class InspectorMemoryAgent; |
+class InspectorMemoryFactory; |
class InspectorPageAgent; |
+class InspectorPageFactory; |
class InspectorState; |
class InstrumentingAgents; |
class IntRect; |
@@ -99,7 +102,7 @@ private: |
}; |
class InspectorTimelineAgent |
- : public InspectorBaseAgent<InspectorTimelineAgent>, |
+ : public InspectorBaseAgent, |
public ScriptGCEventListener, |
public InspectorBackendDispatcher::TimelineCommandHandler, |
public PlatformInstrumentationClient { |
@@ -107,12 +110,9 @@ class InspectorTimelineAgent |
public: |
enum InspectorType { PageInspector, WorkerInspector }; |
- static PassOwnPtr<InspectorTimelineAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorMemoryAgent* memoryAgent, InspectorDOMAgent* domAgent, InspectorCompositeState* state, InspectorType type, InspectorClient* client) |
- { |
- return adoptPtr(new InspectorTimelineAgent(instrumentingAgents, pageAgent, memoryAgent, domAgent, state, type, client)); |
- } |
+ static PassRefPtr<InspectorTimelineAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, PassRefPtr<InspectorMemoryAgent>, PassRefPtr<InspectorDOMAgent>, InspectorType, InspectorClient*); |
- ~InspectorTimelineAgent(); |
+ virtual ~InspectorTimelineAgent(); |
virtual void setFrontend(InspectorFrontend*); |
virtual void clearFrontend(); |
@@ -225,7 +225,7 @@ private: |
size_t usedHeapSizeAtStart; |
}; |
- InspectorTimelineAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorMemoryAgent*, InspectorDOMAgent*, InspectorCompositeState*, InspectorType, InspectorClient*); |
+ InspectorTimelineAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, PassRefPtr<InspectorMemoryAgent>, PassRefPtr<InspectorDOMAgent>, InspectorType, InspectorClient*); |
void didFinishLoadingResource(unsigned long, bool didFail, double finishTime, Frame*); |
@@ -255,9 +255,9 @@ private: |
double timestamp(); |
Page* page(); |
- InspectorPageAgent* m_pageAgent; |
- InspectorMemoryAgent* m_memoryAgent; |
- InspectorDOMAgent* m_domAgent; |
+ RefPtr<InspectorPageAgent> m_pageAgent; |
+ RefPtr<InspectorMemoryAgent> m_memoryAgent; |
+ RefPtr<InspectorDOMAgent> m_domAgent; |
TimelineTimeConverter m_timeConverter; |
InspectorFrontend::Timeline* m_frontend; |
@@ -287,6 +287,18 @@ private: |
unsigned m_styleRecalcElementCounter; |
}; |
+class InspectorTimelineFactory : public InspectorBaseFactory<InspectorTimelineFactory, InspectorTimelineAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorTimelineFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InspectorMemoryFactory* memoryFactory, InspectorDOMFactory* domFactory, InspectorTimelineAgent::InspectorType type, InspectorClient* client) |
+ { |
+ return adoptPtr(new InspectorTimelineFactory(instrumentingAgents, compositeState, pageFactory, memoryFactory, domFactory, type, client)); |
+ } |
+ |
+protected: |
+ InspectorTimelineFactory(InstrumentingAgents*, InspectorCompositeState*, InspectorPageFactory*, InspectorMemoryFactory*, InspectorDOMFactory*, InspectorTimelineAgent::InspectorType, InspectorClient*); |
+}; |
+ |
} // namespace WebCore |
#endif // !defined(InspectorTimelineAgent_h) |