Index: Source/core/inspector/InspectorMemoryAgent.h |
diff --git a/Source/core/inspector/InspectorMemoryAgent.h b/Source/core/inspector/InspectorMemoryAgent.h |
index 0f580c34bb4331c225f86bf29d3c8aa7cc6f6ebb..ed510582db80d7b15980f791f4676bc7881d7ef3 100644 |
--- a/Source/core/inspector/InspectorMemoryAgent.h |
+++ b/Source/core/inspector/InspectorMemoryAgent.h |
@@ -47,14 +47,14 @@ class Page; |
typedef String ErrorString; |
-class InspectorMemoryAgent : public InspectorBaseAgent<InspectorMemoryAgent>, public InspectorBackendDispatcher::MemoryCommandHandler { |
+class InspectorMemoryAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::MemoryCommandHandler { |
WTF_MAKE_NONCOPYABLE(InspectorMemoryAgent); |
public: |
- typedef Vector<OwnPtr<InspectorBaseAgentInterface> > InspectorAgents; |
+ typedef Vector<OwnPtr<InspectorBaseAgent> > InspectorAgents; |
- static PassOwnPtr<InspectorMemoryAgent> create(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorCompositeState* state, Page* page) |
+ static PassRefPtr<InspectorMemoryAgent> create(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorState* state, Page* page) |
{ |
- return adoptPtr(new InspectorMemoryAgent(instrumentingAgents, client, state, page)); |
+ return adoptRef(new InspectorMemoryAgent(instrumentingAgents, client, state, page)); |
} |
virtual ~InspectorMemoryAgent(); |
@@ -69,7 +69,7 @@ public: |
virtual void clearFrontend(); |
private: |
- InspectorMemoryAgent(InstrumentingAgents*, InspectorClient*, InspectorCompositeState*, Page*); |
+ InspectorMemoryAgent(InstrumentingAgents*, InspectorClient*, InspectorState*, Page*); |
PassRefPtr<InspectorObject> getProcessMemoryDistributionImpl(bool reportGraph, HashMap<String, size_t>* memoryInfo); |
@@ -78,6 +78,22 @@ private: |
InspectorFrontend::Memory* m_frontend; |
}; |
+class InspectorMemoryFactory : public InspectorBaseFactory<InspectorMemoryFactory, InspectorMemoryAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorMemoryFactory> create(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorCompositeState* compositeState, Page* page) |
+ { |
+ return adoptPtr(new InspectorMemoryFactory(instrumentingAgents, client, compositeState, page)); |
+ } |
+ |
+protected: |
+ InspectorMemoryFactory(InstrumentingAgents* instrumentingAgents, InspectorClient* client, InspectorCompositeState* compositeState, Page* page) |
+ : InspectorBaseFactory<InspectorMemoryFactory, InspectorMemoryAgent>("Memory", instrumentingAgents, compositeState) |
+ { |
+ setAgent(InspectorMemoryAgent::create(m_instrumentingAgents, client, m_state, page)); |
+ } |
+}; |
+ |
} // namespace WebCore |
#endif // !defined(InspectorMemoryAgent_h) |