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

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: 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/PageDebuggerAgent.h
diff --git a/Source/core/inspector/PageDebuggerAgent.h b/Source/core/inspector/PageDebuggerAgent.h
index eff108c336446113e92650daa7bb37b6cafe931a..09acb59f598943b9312e03769f146f729f98fb73 100644
--- a/Source/core/inspector/PageDebuggerAgent.h
+++ b/Source/core/inspector/PageDebuggerAgent.h
@@ -39,6 +39,7 @@ namespace WebCore {
class InspectorOverlay;
class InspectorPageAgent;
+class InspectorPageController;
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 PageDebuggerController: public InspectorDebuggerController {
+public:
+
+ static PassOwnPtr<PageDebuggerController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, PageScriptDebugServer* pageScriptDebugServer, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay)
+ {
+ return adoptPtr(new PageDebuggerController(instrumentingAgents, compositeState, pageScriptDebugServer, pageController, injectedScriptManager, overlay));
+ }
+
+protected:
+ PageDebuggerController(InstrumentingAgents*, InspectorCompositeState*, PageScriptDebugServer*, InspectorPageController*, InjectedScriptManager*, InspectorOverlay*);
+};
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698