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

Unified Diff: Source/core/inspector/WorkerRuntimeAgent.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/WorkerInspectorController.cpp ('k') | Source/core/inspector/WorkerRuntimeAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/inspector/WorkerInspectorController.cpp ('k') | Source/core/inspector/WorkerRuntimeAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698