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

Unified Diff: Source/core/inspector/InspectorIndexedDBAgent.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/InspectorIndexedDBAgent.cpp
diff --git a/Source/core/inspector/InspectorIndexedDBAgent.cpp b/Source/core/inspector/InspectorIndexedDBAgent.cpp
index 31e07362e10623256cd527625be7926101003416..b463f07620db32823198ab86eabfce06f65921be 100644
--- a/Source/core/inspector/InspectorIndexedDBAgent.cpp
+++ b/Source/core/inspector/InspectorIndexedDBAgent.cpp
@@ -548,8 +548,13 @@ public:
} // namespace
-InspectorIndexedDBAgent::InspectorIndexedDBAgent(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, InspectorPageAgent* pageAgent)
- : InspectorBaseAgent<InspectorIndexedDBAgent>("IndexedDB", instrumentingAgents, state)
+PassRefPtr<InspectorIndexedDBAgent> InspectorIndexedDBAgent::create(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager)
+{
+ return adoptRef(new InspectorIndexedDBAgent(instrumentingAgents, state, pageAgent, injectedScriptManager));
+}
+
+InspectorIndexedDBAgent::InspectorIndexedDBAgent(InstrumentingAgents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, InjectedScriptManager* injectedScriptManager)
+ : InspectorBaseAgent(instrumentingAgents, state)
, m_injectedScriptManager(injectedScriptManager)
, m_pageAgent(pageAgent)
{
@@ -783,4 +788,10 @@ void InspectorIndexedDBAgent::clearObjectStore(ErrorString* errorString, const S
clearObjectStore->start(idbFactory, document->securityOrigin(), databaseName);
}
+InspectorIndexedDBController::InspectorIndexedDBController(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager)
+ : InspectorBaseController<InspectorIndexedDBController, InspectorIndexedDBAgent>("IndexedDB", instrumentingAgents, compositeState)
+{
+ setAgent(InspectorIndexedDBAgent::create(m_instrumentingAgents, m_state, pageController->getAgent(), injectedScriptManager));
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698