Index: Source/core/inspector/WorkerRuntimeAgent.h |
diff --git a/Source/core/inspector/WorkerRuntimeAgent.h b/Source/core/inspector/WorkerRuntimeAgent.h |
index 5ceb747bcc39174f85015a7014eca1aee5304c93..3797dc68da3a2d0b9a2054fe8bfa3c6f7c613046 100644 |
--- a/Source/core/inspector/WorkerRuntimeAgent.h |
+++ b/Source/core/inspector/WorkerRuntimeAgent.h |
@@ -40,9 +40,9 @@ class WorkerContext; |
class WorkerRuntimeAgent : public InspectorRuntimeAgent { |
public: |
- static PassOwnPtr<WorkerRuntimeAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, WorkerContext* context) |
+ static PassRefPtr<WorkerRuntimeAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, WorkerContext* context) |
{ |
- return adoptPtr(new WorkerRuntimeAgent(instrumentingAgents, state, injectedScriptManager, scriptDebugServer, context)); |
+ return adoptRef(new WorkerRuntimeAgent(instrumentingAgents, state, injectedScriptManager, scriptDebugServer, context)); |
} |
virtual ~WorkerRuntimeAgent(); |
@@ -52,7 +52,7 @@ public: |
void willEvaluateWorkerScript(WorkerContext*, int workerThreadStartMode); |
private: |
- WorkerRuntimeAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, ScriptDebugServer*, WorkerContext*); |
+ WorkerRuntimeAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*, ScriptDebugServer*, WorkerContext*); |
virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId); |
virtual void muteConsole(); |
virtual void unmuteConsole(); |
@@ -60,6 +60,22 @@ private: |
bool m_paused; |
}; |
+class WorkerRuntimeFactory : public InspectorRuntimeFactory { |
+public: |
+ |
+ static PassOwnPtr<WorkerRuntimeFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, WorkerContext* context) |
+ { |
+ return adoptPtr(new WorkerRuntimeFactory(instrumentingAgents, compositeState, injectedScriptManager, scriptDebugServer, context)); |
+ } |
+ |
+protected: |
+ WorkerRuntimeFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, WorkerContext* context) |
+ : InspectorRuntimeFactory(instrumentingAgents, compositeState) |
+ { |
+ setAgent(WorkerRuntimeAgent::create(m_instrumentingAgents, m_state, injectedScriptManager, scriptDebugServer, context)); |
+ } |
+}; |
+ |
} // namespace WebCore |
#endif // !defined(InspectorPagerAgent_h) |