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 |