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

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

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/InspectorApplicationCacheAgent.h ('k') | Source/core/inspector/InspectorBaseAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorApplicationCacheAgent.cpp
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.cpp b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
index 608b7bfe5d567e3ad12e965a455041ed84b5beef..219fc5cc2d6c7b24332a95c0efdfc77395fbaee9 100644
--- a/Source/core/inspector/InspectorApplicationCacheAgent.cpp
+++ b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
@@ -42,13 +42,22 @@ namespace ApplicationCacheAgentState {
static const char applicationCacheAgentEnabled[] = "applicationCacheAgentEnabled";
}
-InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InspectorPageAgent* pageAgent)
- : InspectorBaseAgent<InspectorApplicationCacheAgent>("ApplicationCache", instrumentingAgents, state)
+PassRefPtr<InspectorApplicationCacheAgent> InspectorApplicationCacheAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent)
+{
+ return adoptRef(new InspectorApplicationCacheAgent(instrumentingAgents, state, pageAgent));
+}
+
+InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent)
+ : InspectorBaseAgent(instrumentingAgents, state)
, m_pageAgent(pageAgent)
, m_frontend(0)
{
}
+InspectorApplicationCacheAgent::~InspectorApplicationCacheAgent()
+{
+}
+
void InspectorApplicationCacheAgent::setFrontend(InspectorFrontend* frontend)
{
m_frontend = frontend->applicationcache();
@@ -202,5 +211,11 @@ PassRefPtr<TypeBuilder::ApplicationCache::ApplicationCacheResource> InspectorApp
return value;
}
+InspectorApplicationCacheFactory::InspectorApplicationCacheFactory(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory)
+ : InspectorBaseFactory<InspectorApplicationCacheFactory, InspectorApplicationCacheAgent>("ApplicationCache", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorApplicationCacheAgent::create(m_instrumentingAgents, m_state, pageFactory->agent()));
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorApplicationCacheAgent.h ('k') | Source/core/inspector/InspectorBaseAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698