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

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: 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.cpp
diff --git a/Source/core/inspector/InspectorApplicationCacheAgent.cpp b/Source/core/inspector/InspectorApplicationCacheAgent.cpp
index 608b7bfe5d567e3ad12e965a455041ed84b5beef..73672ca9e707d1ff55a7012fd1675be9794ec6bc 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;
}
+InspectorApplicationCacheController::InspectorApplicationCacheController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController)
+ : InspectorBaseController<InspectorApplicationCacheController, InspectorApplicationCacheAgent>("ApplicationCache", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorApplicationCacheAgent::create(m_instrumentingAgents, m_state, pageController->getAgent()));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698