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

Unified Diff: Source/core/inspector/InspectorFileSystemAgent.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/InspectorFileSystemAgent.h
diff --git a/Source/core/inspector/InspectorFileSystemAgent.h b/Source/core/inspector/InspectorFileSystemAgent.h
index 4b38b8ca47ae377dc4679ead04055b2bbb6bebf8..0099d087bb742d19e7ca05f1a61b1d2929fe5440 100644
--- a/Source/core/inspector/InspectorFileSystemAgent.h
+++ b/Source/core/inspector/InspectorFileSystemAgent.h
@@ -40,12 +40,13 @@ namespace WebCore {
class InspectorFrontend;
class InspectorPageAgent;
+class InspectorPageController;
class ScriptExecutionContext;
class SecurityOrigin;
-class InspectorFileSystemAgent : public InspectorBaseAgent<InspectorFileSystemAgent>, public InspectorBackendDispatcher::FileSystemCommandHandler {
+class InspectorFileSystemAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::FileSystemCommandHandler {
public:
- static PassOwnPtr<InspectorFileSystemAgent> create(InstrumentingAgents*, InspectorPageAgent*, InspectorCompositeState*);
+ static PassRefPtr<InspectorFileSystemAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>);
virtual ~InspectorFileSystemAgent();
virtual void enable(ErrorString*) OVERRIDE;
@@ -61,14 +62,26 @@ public:
virtual void restore() OVERRIDE;
private:
- InspectorFileSystemAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorCompositeState*);
+ InspectorFileSystemAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorPageAgent>);
bool assertEnabled(ErrorString*);
ScriptExecutionContext* assertScriptExecutionContextForOrigin(ErrorString*, SecurityOrigin*);
- InspectorPageAgent* m_pageAgent;
+ RefPtr<InspectorPageAgent> m_pageAgent;
bool m_enabled;
};
+class InspectorFileSystemController: public InspectorBaseController<InspectorFileSystemController, InspectorFileSystemAgent> {
+public:
+
+ static PassOwnPtr<InspectorFileSystemController> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorPageController* pageController)
+ {
+ return adoptPtr(new InspectorFileSystemController(instrumentingAgents, compositeState, pageController));
+ }
+
+protected:
+ InspectorFileSystemController(InstrumentingAgents*, InspectorCompositeState*, InspectorPageController*);
+};
+
} // namespace WebCore
#endif // InspectorFileSystemAgent_h

Powered by Google App Engine
This is Rietveld 408576698