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

Unified Diff: Source/core/inspector/InspectorApplicationCacheAgent.h

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments 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
« no previous file with comments | « Source/core/inspector/InspectorAgent.cpp ('k') | Source/core/inspector/InspectorApplicationCacheAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/inspector/InspectorAgent.cpp ('k') | Source/core/inspector/InspectorApplicationCacheAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698