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

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

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments 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
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/inspector/InspectorWorkerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorWorkerAgent.h
diff --git a/Source/core/inspector/InspectorWorkerAgent.h b/Source/core/inspector/InspectorWorkerAgent.h
index 4f53b1f04fe940a94ea9461abbdbd8b74f7238f1..6ffd769602803ce2f9001ac97ad4744c3b2892a7 100644
--- a/Source/core/inspector/InspectorWorkerAgent.h
+++ b/Source/core/inspector/InspectorWorkerAgent.h
@@ -45,10 +45,10 @@ class WorkerContextProxy;
typedef String ErrorString;
-class InspectorWorkerAgent : public InspectorBaseAgent<InspectorWorkerAgent>, public InspectorBackendDispatcher::WorkerCommandHandler {
+class InspectorWorkerAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::WorkerCommandHandler {
public:
- static PassOwnPtr<InspectorWorkerAgent> create(InstrumentingAgents*, InspectorCompositeState*);
- ~InspectorWorkerAgent();
+ static PassRefPtr<InspectorWorkerAgent> create(InstrumentingAgents*, InspectorState*);
+ virtual ~InspectorWorkerAgent();
virtual void setFrontend(InspectorFrontend*);
virtual void restore();
@@ -69,7 +69,7 @@ public:
virtual void setAutoconnectToWorkers(ErrorString*, bool value);
private:
- InspectorWorkerAgent(InstrumentingAgents*, InspectorCompositeState*);
+ InspectorWorkerAgent(InstrumentingAgents*, InspectorState*);
void createWorkerFrontendChannelsForExistingWorkers();
void createWorkerFrontendChannel(WorkerContextProxy*, const String& url);
void destroyWorkerFrontendChannels();
@@ -83,6 +83,22 @@ private:
DedicatedWorkers m_dedicatedWorkers;
};
+class InspectorWorkerFactory : public InspectorBaseFactory<InspectorWorkerFactory, InspectorWorkerAgent> {
+public:
+
+ static PassOwnPtr<InspectorWorkerFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ {
+ return adoptPtr(new InspectorWorkerFactory(instrumentingAgents, compositeState));
+ }
+
+protected:
+ InspectorWorkerFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ : InspectorBaseFactory<InspectorWorkerFactory, InspectorWorkerAgent>("Worker", instrumentingAgents, compositeState)
+ {
+ setAgent(InspectorWorkerAgent::create(m_instrumentingAgents, m_state));
+ }
+};
+
} // namespace WebCore
#endif // !defined(InspectorWorkerAgent_h)
« no previous file with comments | « Source/core/inspector/InspectorTimelineAgent.cpp ('k') | Source/core/inspector/InspectorWorkerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698