| Index: Source/core/inspector/InspectorAgent.h
|
| diff --git a/Source/core/inspector/InspectorAgent.h b/Source/core/inspector/InspectorAgent.h
|
| index a84d9b6b24db16590203bf2966ec1eb46d82ec1b..a800c0ef97d4dc1165d15a271604ce456142202c 100644
|
| --- a/Source/core/inspector/InspectorAgent.h
|
| +++ b/Source/core/inspector/InspectorAgent.h
|
| @@ -51,12 +51,12 @@ class Page;
|
|
|
| typedef String ErrorString;
|
|
|
| -class InspectorAgent : public InspectorBaseAgent<InspectorAgent>, public InspectorBackendDispatcher::InspectorCommandHandler {
|
| +class InspectorAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::InspectorCommandHandler {
|
| WTF_MAKE_NONCOPYABLE(InspectorAgent);
|
| public:
|
| - static PassOwnPtr<InspectorAgent> create(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state)
|
| + static PassRefPtr<InspectorAgent> create(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorState* state)
|
| {
|
| - return adoptPtr(new InspectorAgent(page, injectedScriptManager, instrumentingAgents, state));
|
| + return adoptRef(new InspectorAgent(page, injectedScriptManager, instrumentingAgents, state));
|
| }
|
|
|
| virtual ~InspectorAgent();
|
| @@ -89,7 +89,7 @@ public:
|
| void inspect(PassRefPtr<TypeBuilder::Runtime::RemoteObject> objectToInspect, PassRefPtr<InspectorObject> hints);
|
|
|
| private:
|
| - InspectorAgent(Page*, InjectedScriptManager*, InstrumentingAgents*, InspectorCompositeState*);
|
| + InspectorAgent(Page*, InjectedScriptManager*, InstrumentingAgents*, InspectorState*);
|
|
|
| void unbindAllResources();
|
|
|
| @@ -107,6 +107,22 @@ private:
|
| InjectedScriptForOriginMap m_injectedScriptForOrigin;
|
| };
|
|
|
| +class InspectorAgentFactory : public InspectorBaseFactory<InspectorAgentFactory, InspectorAgent> {
|
| +public:
|
| +
|
| + static PassOwnPtr<InspectorAgentFactory> create(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
|
| + {
|
| + return adoptPtr(new InspectorAgentFactory(page, injectedScriptManager, instrumentingAgents, compositeState));
|
| + }
|
| +
|
| +protected:
|
| + InspectorAgentFactory(Page* page, InjectedScriptManager* injectedScriptManager, InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState)
|
| + : InspectorBaseFactory<InspectorAgentFactory, InspectorAgent>("Inspector", instrumentingAgents, compositeState)
|
| + {
|
| + setAgent(InspectorAgent::create(page, injectedScriptManager, m_instrumentingAgents, m_state));
|
| + }
|
| +};
|
| +
|
| } // namespace WebCore
|
|
|
| #endif // !defined(InspectorAgent_h)
|
|
|