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

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: Made InspectorBaseAgent RefCounted 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
Index: Source/core/inspector/InspectorApplicationCacheAgent.h
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.h b/Source/core/inspector/InspectorApplicationCacheAgent.h
index 3855618c552a8f041b5a3845c02217064c7d42ce..009d578c928d6d04dbb3051bd0c166b7cbecd95e 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 InspectorPageController;
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>);
+ ~InspectorApplicationCacheAgent();
pfeldman 2013/06/18 15:36:06 virtual
Vladislav Kaznacheev 2013/06/19 12:58:43 Done.
// 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 InspectorApplicationCacheController: public InspectorBaseController<InspectorApplicationCacheController, InspectorApplicationCacheAgent> {
pfeldman 2013/06/18 15:36:06 :
Vladislav Kaznacheev 2013/06/19 12:58:43 Done.
+public:
+
+ static PassOwnPtr<InspectorApplicationCacheController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController)
+ {
+ return adoptPtr(new InspectorApplicationCacheController(instrumentingAgents, compositeState, pageController));
+ }
+
+protected:
+ InspectorApplicationCacheController(InstrumentingAgents*, InspectorCompositeState*, InspectorPageController*);
+};
+
} // namespace WebCore
#endif // InspectorApplicationCacheAgent_h

Powered by Google App Engine
This is Rietveld 408576698