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

Unified Diff: Source/core/inspector/PageConsoleAgent.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/InspectorWorkerAgent.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageConsoleAgent.h
diff --git a/Source/core/inspector/PageConsoleAgent.h b/Source/core/inspector/PageConsoleAgent.h
index 59a2e5ba3dfda06b635ae811857a0726afbfe069..d8d776f703ec7928639ff331e54b776f60af13b1 100644
--- a/Source/core/inspector/PageConsoleAgent.h
+++ b/Source/core/inspector/PageConsoleAgent.h
@@ -38,24 +38,34 @@
namespace WebCore {
class InspectorDOMAgent;
+class InspectorDOMFactory;
class PageConsoleAgent : public InspectorConsoleAgent {
WTF_MAKE_NONCOPYABLE(PageConsoleAgent);
public:
- static PassOwnPtr<PageConsoleAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, InspectorDOMAgent* domAgent)
- {
- return adoptPtr(new PageConsoleAgent(instrumentingAgents, state, injectedScriptManager, domAgent));
- }
+ static PassRefPtr<PageConsoleAgent> create(InstrumentingAgents*, InspectorState*, InjectedScriptManager*, PassRefPtr<InspectorDOMAgent>);
virtual ~PageConsoleAgent();
virtual bool isWorkerAgent() OVERRIDE { return false; }
private:
- PageConsoleAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, InspectorDOMAgent*);
+ PageConsoleAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*, PassRefPtr<InspectorDOMAgent>);
virtual void clearMessages(ErrorString*);
virtual void addInspectedNode(ErrorString*, int nodeId);
- InspectorDOMAgent* m_inspectorDOMAgent;
+ RefPtr<InspectorDOMAgent> m_inspectorDOMAgent;
+};
+
+class PageConsoleFactory : public InspectorConsoleFactory {
+public:
+
+ static PassOwnPtr<PageConsoleFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager, InspectorDOMFactory* domFactory)
+ {
+ return adoptPtr(new PageConsoleFactory(instrumentingAgents, compositeState, injectedScriptManager, domFactory));
+ }
+
+protected:
+ PageConsoleFactory(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, InspectorDOMFactory*);
};
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorWorkerAgent.cpp ('k') | Source/core/inspector/PageConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698