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

Unified Diff: Source/core/inspector/InspectorProfilerAgent.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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/inspector/InspectorProfilerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorProfilerAgent.h
diff --git a/Source/core/inspector/InspectorProfilerAgent.h b/Source/core/inspector/InspectorProfilerAgent.h
index 98f48ba688ad55dd80c5abdd5ac4e5bc3f9cd846..ecffa734bb297124aedc6b61e3d9e16a84b85de6 100644
--- a/Source/core/inspector/InspectorProfilerAgent.h
+++ b/Source/core/inspector/InspectorProfilerAgent.h
@@ -44,6 +44,7 @@ namespace WebCore {
class InjectedScriptManager;
class InspectorArray;
class InspectorConsoleAgent;
+class InspectorConsoleFactory;
class InspectorFrontend;
class InspectorObject;
class InspectorState;
@@ -55,10 +56,10 @@ class WorkerContext;
typedef String ErrorString;
-class InspectorProfilerAgent : public InspectorBaseAgent<InspectorProfilerAgent>, public InspectorBackendDispatcher::ProfilerCommandHandler {
+class InspectorProfilerAgent : public InspectorBaseAgent, public InspectorBackendDispatcher::ProfilerCommandHandler {
WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, InspectorCompositeState*, InjectedScriptManager*);
+ static PassRefPtr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorConsoleAgent>, InjectedScriptManager*);
virtual ~InspectorProfilerAgent();
void addProfile(PassRefPtr<ScriptProfile> prpProfile, PassRefPtr<ScriptCallStack>);
@@ -89,7 +90,7 @@ public:
void didProcessTask();
private:
- InspectorProfilerAgent(InstrumentingAgents*, InspectorConsoleAgent*, InspectorCompositeState*, InjectedScriptManager*);
+ InspectorProfilerAgent(InstrumentingAgents*, InspectorState*, PassRefPtr<InspectorConsoleAgent>, InjectedScriptManager*);
void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
@@ -98,7 +99,7 @@ private:
PassRefPtr<TypeBuilder::Profiler::ProfileHeader> createProfileHeader(const ScriptProfile&);
- InspectorConsoleAgent* m_consoleAgent;
+ RefPtr<InspectorConsoleAgent> m_consoleAgent;
InjectedScriptManager* m_injectedScriptManager;
InspectorFrontend::Profiler* m_frontend;
bool m_recordingCPUProfile;
@@ -112,6 +113,18 @@ private:
double m_previousTaskEndTime;
};
+class InspectorProfilerFactory : public InspectorBaseFactory<InspectorProfilerFactory, InspectorProfilerAgent> {
+public:
+
+ static PassOwnPtr<InspectorProfilerFactory> create(InstrumentingAgents* instrumentingAgents, InspectorCompositeState* compositeState, InspectorConsoleFactory* consoleFactory, InjectedScriptManager* injectedScriptManager)
+ {
+ return adoptPtr(new InspectorProfilerFactory(instrumentingAgents, compositeState, consoleFactory, injectedScriptManager));
+ }
+
+protected:
+ InspectorProfilerFactory(InstrumentingAgents*, InspectorCompositeState*, InspectorConsoleFactory*, InjectedScriptManager*);
+};
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/inspector/InspectorProfilerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698