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

Unified Diff: Source/core/inspector/PageRuntimeAgent.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/PageRuntimeAgent.h
diff --git a/Source/core/inspector/PageRuntimeAgent.h b/Source/core/inspector/PageRuntimeAgent.h
index 30be7c307e62ec1fa0788987e661c2f893236336..c04d8fa34e1bc0d91b86f3f27182d2c85e7b76eb 100644
--- a/Source/core/inspector/PageRuntimeAgent.h
+++ b/Source/core/inspector/PageRuntimeAgent.h
@@ -40,15 +40,13 @@
namespace WebCore {
class InspectorPageAgent;
+class InspectorPageController;
class Page;
class SecurityOrigin;
class PageRuntimeAgent : public InspectorRuntimeAgent {
public:
- static PassOwnPtr<PageRuntimeAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer, Page* page, InspectorPageAgent* pageAgent)
- {
- return adoptPtr(new PageRuntimeAgent(instrumentingAgents, state, injectedScriptManager, scriptDebugServer, page, pageAgent));
- }
+ static PassRefPtr<PageRuntimeAgent> create(InstrumentingAgents*, InspectorState*, Page*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, ScriptDebugServer*);
virtual ~PageRuntimeAgent();
virtual void setFrontend(InspectorFrontend*);
virtual void clearFrontend();
@@ -60,7 +58,7 @@ public:
void didCreateIsolatedContext(Frame*, ScriptState*, SecurityOrigin*);
private:
- PageRuntimeAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, ScriptDebugServer*, Page*, InspectorPageAgent*);
+ PageRuntimeAgent(InstrumentingAgents*, InspectorState*, Page*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, ScriptDebugServer*);
virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId);
virtual void muteConsole();
@@ -69,11 +67,23 @@ private:
void notifyContextCreated(const String& frameId, ScriptState*, SecurityOrigin*, bool isPageContext);
Page* m_inspectedPage;
- InspectorPageAgent* m_pageAgent;
+ RefPtr<InspectorPageAgent> m_pageAgent;
InspectorFrontend::Runtime* m_frontend;
bool m_mainWorldContextCreated;
};
+class PageRuntimeController: public InspectorRuntimeController {
+public:
+
+ static PassOwnPtr<PageRuntimeController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, Page* page, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager, ScriptDebugServer* scriptDebugServer)
+ {
+ return adoptPtr(new PageRuntimeController(instrumentingAgents, compositeState, page, pageController, injectedScriptManager, scriptDebugServer));
+ }
+
+protected:
+ PageRuntimeController(InstrumentingAgents*, InspectorCompositeState*, Page*, InspectorPageController*, InjectedScriptManager*, ScriptDebugServer*);
+};
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698