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

Unified Diff: Source/core/inspector/InspectorFileSystemAgent.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/InspectorFileSystemAgent.cpp
diff --git a/Source/core/inspector/InspectorFileSystemAgent.cpp b/Source/core/inspector/InspectorFileSystemAgent.cpp
index 1ff8176cbefa152e573208a9779d7faa16ab0ddb..71569d896eacee57e4461829595136e2d32bd598 100644
--- a/Source/core/inspector/InspectorFileSystemAgent.cpp
+++ b/Source/core/inspector/InspectorFileSystemAgent.cpp
@@ -600,9 +600,9 @@ bool DeleteEntryRequest::didDeleteEntry()
} // anonymous namespace
// static
-PassOwnPtr<InspectorFileSystemAgent> InspectorFileSystemAgent::create(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* state)
+PassRefPtr<InspectorFileSystemAgent> InspectorFileSystemAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent)
{
- return adoptPtr(new InspectorFileSystemAgent(instrumentingAgents, pageAgent, state));
+ return adoptRef(new InspectorFileSystemAgent(instrumentingAgents, state, pageAgent));
}
InspectorFileSystemAgent::~InspectorFileSystemAgent()
@@ -700,8 +700,8 @@ void InspectorFileSystemAgent::restore()
m_enabled = m_state->getBoolean(FileSystemAgentState::fileSystemAgentEnabled);
}
-InspectorFileSystemAgent::InspectorFileSystemAgent(InstrumentingAgents* instrumentingAgents, InspectorPageAgent* pageAgent, InspectorCompositeState* state)
- : InspectorBaseAgent<InspectorFileSystemAgent>("FileSystem", instrumentingAgents, state)
+InspectorFileSystemAgent::InspectorFileSystemAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent)
+ : InspectorBaseAgent(instrumentingAgents, state)
, m_pageAgent(pageAgent)
, m_enabled(false)
{
@@ -730,4 +730,10 @@ ScriptExecutionContext* InspectorFileSystemAgent::assertScriptExecutionContextFo
return 0;
}
+InspectorFileSystemController::InspectorFileSystemController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController)
+ : InspectorBaseController<InspectorFileSystemController, InspectorFileSystemAgent>("FileSystem", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorFileSystemAgent::create(m_instrumentingAgents, m_state, pageController->getAgent()));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698