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

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: Made InspectorBaseAgent RefCounted 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
Index: Source/core/inspector/PageConsoleAgent.h
diff --git a/Source/core/inspector/PageConsoleAgent.h b/Source/core/inspector/PageConsoleAgent.h
index 59a2e5ba3dfda06b635ae811857a0726afbfe069..8a4b409a289cc2faa0d828b46709937312e4d0e4 100644
--- a/Source/core/inspector/PageConsoleAgent.h
+++ b/Source/core/inspector/PageConsoleAgent.h
@@ -38,24 +38,34 @@
namespace WebCore {
class InspectorDOMAgent;
+class InspectorDOMController;
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 PageConsoleController: public InspectorConsoleController {
+public:
+
+ static PassOwnPtr<PageConsoleController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InjectedScriptManager* injectedScriptManager, InspectorDOMController* domController)
+ {
+ return adoptPtr(new PageConsoleController(instrumentingAgents, compositeState, injectedScriptManager, domController));
+ }
+
+protected:
+ PageConsoleController(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, InspectorDOMController*);
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698