Index: Source/core/inspector/InspectorApplicationCacheAgent.h |
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.h b/Source/core/inspector/InspectorApplicationCacheAgent.h |
index 3855618c552a8f041b5a3845c02217064c7d42ce..6a351d99c255cabf7be301f0a5b33877492d78ca 100644 |
--- a/Source/core/inspector/InspectorApplicationCacheAgent.h |
+++ b/Source/core/inspector/InspectorApplicationCacheAgent.h |
@@ -39,6 +39,7 @@ class InspectorArray; |
class InspectorFrontend; |
class InspectorObject; |
class InspectorPageAgent; |
+class InspectorPageFactory; |
class InspectorValue; |
class InspectorState; |
class InstrumentingAgents; |
@@ -47,14 +48,11 @@ class ResourceResponse; |
typedef String ErrorString; |
-class InspectorApplicationCacheAgent : public InspectorBaseAgent<InspectorApplicationCacheAgent>, public InspectorBackendDispatcher::ApplicationCacheCommandHandler { |
+class InspectorApplicationCacheAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::ApplicationCacheCommandHandler { |
WTF_MAKE_NONCOPYABLE(InspectorApplicationCacheAgent); WTF_MAKE_FAST_ALLOCATED; |
public: |
- static PassOwnPtr<InspectorApplicationCacheAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pageAgent) |
- { |
- return adoptPtr(new InspectorApplicationCacheAgent(instrumentingAgents, state, pageAgent)); |
- } |
- ~InspectorApplicationCacheAgent() { } |
+ static PassRefPtr<InspectorApplicationCacheAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>); |
+ virtual ~InspectorApplicationCacheAgent(); |
// InspectorBaseAgent |
virtual void setFrontend(InspectorFrontend*); |
@@ -72,17 +70,29 @@ public: |
virtual void getApplicationCacheForFrame(ErrorString*, const String& frameId, RefPtr<TypeBuilder::ApplicationCache::ApplicationCache>&); |
private: |
- InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorCompositeState*, InspectorPageAgent*); |
+ InspectorApplicationCacheAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>); |
PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCache> buildObjectForApplicationCache(const ApplicationCacheHost::ResourceInfoList&, const ApplicationCacheHost::CacheInfo&); |
PassRefPtr<TypeBuilder::Array<TypeBuilder::ApplicationCache::ApplicationCacheResource> > buildArrayForApplicationCacheResources(const ApplicationCacheHost::ResourceInfoList&); |
PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> buildObjectForApplicationCacheResource(const ApplicationCacheHost::ResourceInfo&); |
DocumentLoader* assertFrameWithDocumentLoader(ErrorString*, String frameId); |
- InspectorPageAgent* m_pageAgent; |
+ RefPtr<InspectorPageAgent> m_pageAgent; |
InspectorFrontend::ApplicationCache* m_frontend; |
}; |
+class InspectorApplicationCacheFactory : public InspectorBaseFactory<InspectorApplicationCacheFactory, InspectorApplicationCacheAgent> { |
+public: |
+ |
+ static PassOwnPtr<InspectorApplicationCacheFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory) |
+ { |
+ return adoptPtr(new InspectorApplicationCacheFactory(instrumentingAgents, compositeState, pageFactory)); |
+ } |
+ |
+protected: |
+ InspectorApplicationCacheFactory(InstrumentingAgents*, InspectorCompositeState*, InspectorPageFactory*); |
+}; |
+ |
} // namespace WebCore |
#endif // InspectorApplicationCacheAgent_h |