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

Unified Diff: Source/core/inspector/WorkerConsoleAgent.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/PageRuntimeAgent.cpp ('k') | Source/core/inspector/WorkerConsoleAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/WorkerConsoleAgent.h
diff --git a/Source/core/inspector/WorkerConsoleAgent.h b/Source/core/inspector/WorkerConsoleAgent.h
index 27ec0acfaa4cc60ee212facf9ea5124d0e16c64f..305ba85598a888fd675e0a070c4fefff2750d8ea 100644
--- a/Source/core/inspector/WorkerConsoleAgent.h
+++ b/Source/core/inspector/WorkerConsoleAgent.h
@@ -39,19 +39,35 @@ namespace WebCore {
class WorkerConsoleAgent : public InspectorConsoleAgent {
WTF_MAKE_NONCOPYABLE(WorkerConsoleAgent);
public:
- static PassOwnPtr<WorkerConsoleAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager)
+ static PassRefPtr<WorkerConsoleAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, InjectedScriptManager* injectedScriptManager)
{
- return adoptPtr(new WorkerConsoleAgent(instrumentingAgents, state, injectedScriptManager));
+ return adoptRef(new WorkerConsoleAgent(instrumentingAgents, state, injectedScriptManager));
}
virtual ~WorkerConsoleAgent();
virtual bool isWorkerAgent() OVERRIDE { return true; }
private:
- WorkerConsoleAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*);
+ WorkerConsoleAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*);
virtual void addInspectedNode(ErrorString*, int nodeId);
};
+class WorkerConsoleFactory : public InspectorConsoleFactory {
+public:
+
+ static PassOwnPtr<WorkerConsoleFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager)
+ {
+ return adoptPtr(new WorkerConsoleFactory(instrumentingAgents, compositeState, injectedScriptManager));
+ }
+
+protected:
+ WorkerConsoleFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager)
+ : InspectorConsoleFactory(instrumentingAgents, compositeState)
+ {
+ setAgent(WorkerConsoleAgent::create(m_instrumentingAgents, m_state, injectedScriptManager));
+ }
+};
+
} // namespace WebCore
#endif // !defined(WorkerConsoleAgent_h)
« no previous file with comments | « Source/core/inspector/PageRuntimeAgent.cpp ('k') | Source/core/inspector/WorkerConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698