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

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: 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.h
diff --git a/Source/core/inspector/InspectorIndexedDBAgent.h b/Source/core/inspector/InspectorIndexedDBAgent.h
index 259b2a7c591eea90bb289251595ed92667aa0d8a..83b8bedc8bf97a0e45c3e97ee80f7025aca7467b 100644
--- a/Source/core/inspector/InspectorIndexedDBAgent.h
+++ b/Source/core/inspector/InspectorIndexedDBAgent.h
@@ -39,15 +39,13 @@ namespace WebCore {
class InjectedScriptManager;
class InspectorPageAgent;
+class InspectorPageController;
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));
- }
+ static PassRefPtr<InspectorIndexedDBAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>, InjectedScriptManager*);
~InspectorIndexedDBAgent();
virtual void clearFrontend();
@@ -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 InspectorIndexedDBController: public InspectorBaseController<InspectorIndexedDBController, InspectorIndexedDBAgent> {
+public:
+
+ static PassOwnPtr<InspectorIndexedDBController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController, InjectedScriptManager* injectedScriptManager)
+ {
+ return adoptPtr(new InspectorIndexedDBController(instrumentingAgents, compositeState, pageController, injectedScriptManager));
+ }
+
+protected:
+ InspectorIndexedDBController(InstrumentingAgents*, InspectorCompositeState*, InspectorPageController*, InjectedScriptManager*);
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698