Index: Source/core/inspector/InspectorHeapProfilerAgent.h |
diff --git a/Source/core/inspector/InspectorHeapProfilerAgent.h b/Source/core/inspector/InspectorHeapProfilerAgent.h |
index 03ac5603bde46713a36dc142cf525d6579f03c77..160678db8e3960c949ee2f420012fd411163ab0f 100644 |
--- a/Source/core/inspector/InspectorHeapProfilerAgent.h |
+++ b/Source/core/inspector/InspectorHeapProfilerAgent.h |
@@ -51,10 +51,10 @@ class ScriptProfile; |
typedef String ErrorString; |
-class InspectorHeapProfilerAgent : public InspectorBaseAgent<InspectorHeapProfilerAgent>, public InspectorBackendDispatcher::HeapProfilerCommandHandler { |
+class InspectorHeapProfilerAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::HeapProfilerCommandHandler { |
WTF_MAKE_NONCOPYABLE(InspectorHeapProfilerAgent); WTF_MAKE_FAST_ALLOCATED; |
public: |
- static PassOwnPtr<InspectorHeapProfilerAgent> create(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*); |
+ static PassRefPtr<InspectorHeapProfilerAgent> create(InstrumentingAgents*, InspectorState*, InjectedScriptManager*); |
virtual ~InspectorHeapProfilerAgent(); |
virtual void collectGarbage(ErrorString*); |
@@ -82,7 +82,7 @@ private: |
class HeapStatsStream; |
class HeapStatsUpdateTask; |
- InspectorHeapProfilerAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*); |
+ InspectorHeapProfilerAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*); |
typedef HashMap<unsigned, RefPtr<ScriptHeapSnapshot> > IdToHeapSnapshotMap; |
@@ -99,6 +99,22 @@ private: |
OwnPtr<HeapStatsUpdateTask> m_heapStatsUpdateTask; |
}; |
+class InspectorHeapProfilerFactory : public InspectorBaseFactory<InspectorHeapProfilerFactory, InspectorHeapProfilerAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorHeapProfilerFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager) |
+ { |
+ return adoptPtr(new InspectorHeapProfilerFactory(instrumentingAgents, compositeState, injectedScriptManager)); |
+ } |
+ |
+protected: |
+ InspectorHeapProfilerFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager) |
+ : InspectorBaseFactory<InspectorHeapProfilerFactory, InspectorHeapProfilerAgent>("HeapProfiler", instrumentingAgents, compositeState) |
+ { |
+ setAgent(InspectorHeapProfilerAgent::create(m_instrumentingAgents, m_state, injectedScriptManager)); |
+ } |
+}; |
+ |
} // namespace WebCore |