Index: Source/core/inspector/InspectorCSSAgent.h |
diff --git a/Source/core/inspector/InspectorCSSAgent.h b/Source/core/inspector/InspectorCSSAgent.h |
index 5eafc008a6bf6e1b02ee28de69195d2122a73b5e..229b4b572d38ae24a519c7d023b8ad1b72af471b 100644 |
--- a/Source/core/inspector/InspectorCSSAgent.h |
+++ b/Source/core/inspector/InspectorCSSAgent.h |
@@ -67,7 +67,7 @@ class UpdateRegionLayoutTask; |
typedef HashMap<CSSStyleSheet*, RefPtr<InspectorStyleSheet> > CSSStyleSheetToInspectorStyleSheet; |
class InspectorCSSAgent |
- : public InspectorBaseAgent<InspectorCSSAgent> |
+ : public InspectorBaseAgent |
, public InspectorDOMAgent::DOMListener |
, public InspectorBackendDispatcher::CSSCommandHandler |
, public InspectorStyleSheet::Listener { |
@@ -100,11 +100,11 @@ public: |
static CSSStyleRule* asCSSStyleRule(CSSRule*); |
static bool cssErrorFilter(const CSSParserString& content, int propertyId, int errorType); |
- static PassOwnPtr<InspectorCSSAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InspectorDOMAgent* domAgent, InspectorPageAgent* pageAgent) |
+ static PassRefPtr<InspectorCSSAgent> create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorDOMAgent> domAgent, PassRefPtr<InspectorPageAgent> pageAgent) |
{ |
- return adoptPtr(new InspectorCSSAgent(instrumentingAgents, state, domAgent, pageAgent)); |
+ return adoptRef(new InspectorCSSAgent(instrumentingAgents, state, domAgent, pageAgent)); |
} |
- ~InspectorCSSAgent(); |
+ virtual ~InspectorCSSAgent(); |
bool forcePseudoState(Element*, CSSSelector::PseudoType); |
virtual void setFrontend(InspectorFrontend*); |
@@ -159,7 +159,7 @@ private: |
class SetRuleSelectorAction; |
class AddRuleAction; |
- InspectorCSSAgent(InstrumentingAgents*, InspectorCompositeState*, InspectorDOMAgent*, InspectorPageAgent*); |
+ InspectorCSSAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorDOMAgent>, PassRefPtr<InspectorPageAgent>); |
typedef HashMap<String, RefPtr<InspectorStyleSheet> > IdToInspectorStyleSheet; |
typedef HashMap<Node*, RefPtr<InspectorStyleSheetForInlineStyle> > NodeToInspectorStyleSheet; // bogus "stylesheets" with elements' inline styles |
@@ -197,8 +197,8 @@ private: |
void resetPseudoStates(); |
InspectorFrontend::CSS* m_frontend; |
- InspectorDOMAgent* m_domAgent; |
- InspectorPageAgent* m_pageAgent; |
+ RefPtr<InspectorDOMAgent> m_domAgent; |
+ RefPtr<InspectorPageAgent> m_pageAgent; |
IdToInspectorStyleSheet m_idToInspectorStyleSheet; |
CSSStyleSheetToInspectorStyleSheet m_cssStyleSheetToInspectorStyleSheet; |
@@ -216,6 +216,17 @@ private: |
friend class StyleSheetBinder; |
}; |
+class InspectorCSSFactory : public InspectorBaseFactory<InspectorCSSFactory, InspectorCSSAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorCSSFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorDOMFactory* domFactory, InspectorPageFactory* pageFactory) |
+ { |
+ return adoptPtr(new InspectorCSSFactory(instrumentingAgents, compositeState, domFactory, pageFactory)); |
+ } |
+ |
+protected: |
+ InspectorCSSFactory(InstrumentingAgents*, InspectorCompositeState*, InspectorDOMFactory*, InspectorPageFactory*); |
+}; |
} // namespace WebCore |