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

Unified Diff: Source/core/inspector/WorkerDebuggerAgent.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/WorkerConsoleAgent.cpp ('k') | Source/core/inspector/WorkerDebuggerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/WorkerDebuggerAgent.h
diff --git a/Source/core/inspector/WorkerDebuggerAgent.h b/Source/core/inspector/WorkerDebuggerAgent.h
index b766d853afe8d543896b5f86e9d5f409fd86bac1..138507f4c7a369d084400cca3c5ef5e0763b4cfc 100644
--- a/Source/core/inspector/WorkerDebuggerAgent.h
+++ b/Source/core/inspector/WorkerDebuggerAgent.h
@@ -43,14 +43,14 @@ class WorkerDebuggerAgent : public InspectorDebuggerAgent {
WTF_MAKE_NONCOPYABLE(WorkerDebuggerAgent);
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<WorkerDebuggerAgent> create(InstrumentingAgents*, InspectorCompositeState*, WorkerScriptDebugServer*, WorkerContext*, InjectedScriptManager*);
+ static PassRefPtr<WorkerDebuggerAgent> create(InstrumentingAgents*, InspectorState*, WorkerScriptDebugServer*, WorkerContext*, InjectedScriptManager*);
virtual ~WorkerDebuggerAgent();
static const char* debuggerTaskMode;
static void interruptAndDispatchInspectorCommands(WorkerThread*);
private:
- WorkerDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, WorkerScriptDebugServer*, WorkerContext*, InjectedScriptManager*);
+ WorkerDebuggerAgent(InstrumentingAgents*, InspectorState*, WorkerScriptDebugServer*, WorkerContext*, InjectedScriptManager*);
virtual void startListeningScriptDebugServer();
virtual void stopListeningScriptDebugServer();
@@ -64,6 +64,22 @@ private:
WorkerContext* m_inspectedWorkerContext;
};
+class WorkerDebuggerFactory : public InspectorDebuggerFactory {
+public:
+
+ static PassOwnPtr<WorkerDebuggerFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, WorkerScriptDebugServer* scriptDebugServer, WorkerContext* context, InjectedScriptManager* injectedScriptManager)
+ {
+ return adoptPtr(new WorkerDebuggerFactory(instrumentingAgents, compositeState, scriptDebugServer, context, injectedScriptManager));
+ }
+
+protected:
+ WorkerDebuggerFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, WorkerScriptDebugServer* scriptDebugServer, WorkerContext* context, InjectedScriptManager* injectedScriptManager)
+ : InspectorDebuggerFactory(instrumentingAgents, compositeState)
+ {
+ setAgent(WorkerDebuggerAgent::create(m_instrumentingAgents, m_state, scriptDebugServer, context, injectedScriptManager));
+ }
+};
+
} // namespace WebCore
#endif // !defined(WorkerDebuggerAgent_h)
« no previous file with comments | « Source/core/inspector/WorkerConsoleAgent.cpp ('k') | Source/core/inspector/WorkerDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698