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

Unified Diff: Source/core/inspector/InspectorTimelineAgent.h

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.h
diff --git a/Source/core/inspector/InspectorTimelineAgent.h b/Source/core/inspector/InspectorTimelineAgent.h
index 2a35c564af61f63532e53df55646dbdfc7e856da..742fe1d3b2a3cd355ea4639a03c28c7800407d54 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 InspectorDOMController;
class InspectorFrontend;
class InspectorMemoryAgent;
+class InspectorMemoryController;
class InspectorPageAgent;
+class InspectorPageController;
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,10 +110,7 @@ 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();
@@ -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 InspectorTimelineController: public InspectorBaseController<InspectorTimelineController, InspectorTimelineAgent> {
+public:
+
+ static PassOwnPtr<InspectorTimelineController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InspectorMemoryController* memoryController, InspectorDOMController* domController, InspectorTimelineAgent::InspectorType type, InspectorClient* client)
+ {
+ return adoptPtr(new InspectorTimelineController(instrumentingAgents, compositeState, pageController, memoryController, domController, type, client));
+ }
+
+protected:
+ InspectorTimelineController(InstrumentingAgents*, InspectorCompositeState*, InspectorPageController*, InspectorMemoryController*, InspectorDOMController*, InspectorTimelineAgent::InspectorType, InspectorClient*);
+};
+
} // namespace WebCore
#endif // !defined(InspectorTimelineAgent_h)

Powered by Google App Engine
This is Rietveld 408576698