Index: Source/core/inspector/InspectorDOMAgent.h |
diff --git a/Source/core/inspector/InspectorDOMAgent.h b/Source/core/inspector/InspectorDOMAgent.h |
index 912fdb6b9138caba9590c6539627c4e54b5d7615..6782a0d39167e36489f12820fd1a4797fe158870 100644 |
--- a/Source/core/inspector/InspectorDOMAgent.h |
+++ b/Source/core/inspector/InspectorDOMAgent.h |
@@ -62,6 +62,7 @@ class InspectorFrontend; |
class InspectorHistory; |
class InspectorOverlay; |
class InspectorPageAgent; |
+class InspectorPageController; |
class HTMLElement; |
class InspectorState; |
class InstrumentingAgents; |
@@ -91,7 +92,7 @@ struct EventListenerInfo { |
const EventListenerVector eventListenerVector; |
}; |
-class InspectorDOMAgent : public InspectorBaseAgent<InspectorDOMAgent>, public InspectorBackendDispatcher::DOMCommandHandler { |
+class InspectorDOMAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::DOMCommandHandler { |
WTF_MAKE_NONCOPYABLE(InspectorDOMAgent); |
public: |
struct DOMListener { |
@@ -103,10 +104,7 @@ public: |
virtual void didModifyDOMAttr(Element*) = 0; |
}; |
- static PassOwnPtr<InspectorDOMAgent> create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* inspectorState, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client) |
- { |
- return adoptPtr(new InspectorDOMAgent(instrumentingAgents, pageAgent, inspectorState, injectedScriptManager, overlay, client)); |
- } |
+ static PassRefPtr<InspectorDOMAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
static String toErrorString(const ExceptionCode&); |
@@ -206,11 +204,8 @@ public: |
Element* assertElement(ErrorString*, int nodeId); |
Document* assertDocument(ErrorString*, int nodeId); |
- // Methods called from other agents. |
- InspectorPageAgent* pageAgent() { return m_pageAgent; } |
- |
private: |
- InspectorDOMAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorCompositeState*, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
+ InspectorDOMAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
void setSearchingForNode(ErrorString*, bool enabled, InspectorObject* highlightConfig); |
PassOwnPtr<HighlightConfig> highlightConfigFromInspectorObject(ErrorString*, InspectorObject* highlightInspectorObject); |
@@ -244,7 +239,7 @@ private: |
void innerHighlightQuad(PassOwnPtr<FloatQuad>, const RefPtr<InspectorObject>* color, const RefPtr<InspectorObject>* outlineColor); |
- InspectorPageAgent* m_pageAgent; |
+ RefPtr<InspectorPageAgent> m_pageAgent; |
InjectedScriptManager* m_injectedScriptManager; |
InspectorOverlay* m_overlay; |
InspectorClient* m_client; |
@@ -273,6 +268,18 @@ private: |
}; |
+class InspectorDOMController: public InspectorBaseController<InspectorDOMController, InspectorDOMAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorDOMController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager, InspectorOverlay* overlay, InspectorClient* client) |
+ { |
+ return adoptPtr(new InspectorDOMController(instrumentingAgents, compositeState, pageController, injectedScriptManager, overlay, client)); |
+ } |
+ |
+protected: |
+ InspectorDOMController(InstrumentingAgents*, InspectorCompositeState*, InspectorPageController*, InjectedScriptManager*, InspectorOverlay*, InspectorClient*); |
+}; |
+ |
} // namespace WebCore |
#endif // !defined(InspectorDOMAgent_h) |