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

Unified Diff: Source/core/inspector/PageDebuggerAgent.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/PageConsoleAgent.cpp ('k') | Source/core/inspector/PageDebuggerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/PageDebuggerAgent.h
diff --git a/Source/core/inspector/PageDebuggerAgent.h b/Source/core/inspector/PageDebuggerAgent.h
index eff108c336446113e92650daa7bb37b6cafe931a..0bff1a2aa3beb74b29259893712707021548e13d 100644
--- a/Source/core/inspector/PageDebuggerAgent.h
+++ b/Source/core/inspector/PageDebuggerAgent.h
@@ -39,6 +39,7 @@ namespace WebCore {
class InspectorOverlay;
class InspectorPageAgent;
+class InspectorPageFactory;
class Page;
class PageScriptDebugServer;
@@ -48,7 +49,7 @@ class PageDebuggerAgent :
WTF_MAKE_NONCOPYABLE(PageDebuggerAgent);
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<PageDebuggerAgent> create(InstrumentingAgents*, InspectorCompositeState*, PageScriptDebugServer*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*);
+ static PassRefPtr<PageDebuggerAgent> create(InstrumentingAgents*, InspectorState*, PageScriptDebugServer*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, InspectorOverlay*);
virtual ~PageDebuggerAgent();
void didClearWindowObjectInWorld(Frame*, DOMWrapperWorld*);
@@ -72,12 +73,24 @@ private:
virtual InjectedScript injectedScriptForEval(ErrorString*, const int* executionContextId);
virtual void setOverlayMessage(ErrorString*, const String*);
- PageDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, PageScriptDebugServer*, InspectorPageAgent*, InjectedScriptManager*, InspectorOverlay*);
+ PageDebuggerAgent(InstrumentingAgents*, InspectorState*, PageScriptDebugServer*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, InspectorOverlay*);
PageScriptDebugServer* m_pageScriptDebugServer;
- InspectorPageAgent* m_pageAgent;
+ RefPtr<InspectorPageAgent> m_pageAgent;
InspectorOverlay* m_overlay;
};
+class PageDebuggerFactory : public InspectorDebuggerFactory {
+public:
+
+ static PassOwnPtr<PageDebuggerFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+ {
+ return adoptPtr(new PageDebuggerFactory(instrumentingAgents, compositeState, pageScriptDebugServer, pageFactory, injectedScriptManager, overlay));
+ }
+
+protected:
+ PageDebuggerFactory(InstrumentingAgents*, InspectorCompositeState*, PageScriptDebugServer*, InspectorPageFactory*, InjectedScriptManager*, InspectorOverlay*);
+};
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/PageConsoleAgent.cpp ('k') | Source/core/inspector/PageDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698