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

Unified Diff: Source/core/inspector/InspectorIndexedDBAgent.h

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
Index: Source/core/inspector/InspectorIndexedDBAgent.h
diff --git a/Source/core/inspector/InspectorIndexedDBAgent.h b/Source/core/inspector/InspectorIndexedDBAgent.h
index 259b2a7c591eea90bb289251595ed92667aa0d8a..872c1c77d9591cd09878926cea9b9c39ec4d69d1 100644
--- a/Source/core/inspector/InspectorIndexedDBAgent.h
+++ b/Source/core/inspector/InspectorIndexedDBAgent.h
@@ -39,16 +39,14 @@ namespace WebCore {
class InjectedScriptManager;
class InspectorPageAgent;
+class InspectorPageFactory;
typedef String ErrorString;
-class InspectorIndexedDBAgent : public InspectorBaseAgent<InspectorIndexedDBAgent>, public InspectorBackendDispatcher::IndexedDBCommandHandler {
+class InspectorIndexedDBAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::IndexedDBCommandHandler {
public:
- static PassOwnPtr<InspectorIndexedDBAgent> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* state, InjectedScriptManager* injectedScriptManager, InspectorPageAgent* pageAgent)
- {
- return adoptPtr(new InspectorIndexedDBAgent(instrumentingAgents, state, injectedScriptManager, pageAgent));
- }
- ~InspectorIndexedDBAgent();
+ static PassRefPtr<InspectorIndexedDBAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*);
+ virtual ~InspectorIndexedDBAgent();
virtual void clearFrontend();
virtual void restore();
@@ -62,10 +60,22 @@ public:
virtual void clearObjectStore(ErrorString*, const String& in_securityOrigin, const String& in_databaseName, const String& in_objectStoreName, PassRefPtr<ClearObjectStoreCallback>);
private:
- InspectorIndexedDBAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*, InspectorPageAgent*);
+ InspectorIndexedDBAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*);
InjectedScriptManager* m_injectedScriptManager;
- InspectorPageAgent* m_pageAgent;
+ RefPtr<InspectorPageAgent> m_pageAgent;
+};
+
+class InspectorIndexedDBFactory : public InspectorBaseFactory<InspectorIndexedDBFactory, InspectorIndexedDBAgent> {
+public:
+
+ static PassOwnPtr<InspectorIndexedDBFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* pageFactory, InjectedScriptManager* injectedScriptManager)
+ {
+ return adoptPtr(new InspectorIndexedDBFactory(instrumentingAgents, compositeState, pageFactory, injectedScriptManager));
+ }
+
+protected:
+ InspectorIndexedDBFactory(InstrumentingAgents*, InspectorCompositeState*, InspectorPageFactory*, InjectedScriptManager*);
};
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorHeapProfilerAgent.cpp ('k') | Source/core/inspector/InspectorIndexedDBAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698