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

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: 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/InspectorWorkerAgent.h
diff --git a/Source/core/inspector/InspectorWorkerAgent.h b/Source/core/inspector/InspectorWorkerAgent.h
index 4f53b1f04fe940a94ea9461abbdbd8b74f7238f1..a60d072189ad2aeb671a8b833fec5d6e0d65f326 100644
--- a/Source/core/inspector/InspectorWorkerAgent.h
+++ b/Source/core/inspector/InspectorWorkerAgent.h
@@ -45,9 +45,9 @@ 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*);
+ static PassRefPtr<InspectorWorkerAgent> create(InstrumentingAgents*, InspectorState*);
~InspectorWorkerAgent();
virtual void setFrontend(InspectorFrontend*);
@@ -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 InspectorWorkerController: public InspectorBaseController<InspectorWorkerController, InspectorWorkerAgent> {
pfeldman 2013/06/18 15:36:06 Space before :
Vladislav Kaznacheev 2013/06/19 12:58:43 Done.
+public:
+
+ static PassOwnPtr<InspectorWorkerController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ {
+ return adoptPtr(new InspectorWorkerController(instrumentingAgents, compositeState));
+ }
+
+protected:
+ InspectorWorkerController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
+ : InspectorBaseController<InspectorWorkerController, InspectorWorkerAgent>("Worker", instrumentingAgents, compositeState)
+ {
+ setAgent(InspectorWorkerAgent::create(m_instrumentingAgents, m_state));
+ }
+};
+
} // namespace WebCore
#endif // !defined(InspectorWorkerAgent_h)

Powered by Google App Engine
This is Rietveld 408576698