summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/InspectorProfilerAgent.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-24 11:24:40 +0100
committerBen Murdoch <benm@google.com>2011-06-02 09:53:15 +0100
commit81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch)
tree7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebCore/inspector/InspectorProfilerAgent.h
parent94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff)
downloadexternal_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz
external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebCore/inspector/InspectorProfilerAgent.h')
-rw-r--r--Source/WebCore/inspector/InspectorProfilerAgent.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/Source/WebCore/inspector/InspectorProfilerAgent.h b/Source/WebCore/inspector/InspectorProfilerAgent.h
index 93637f5..839d801 100644
--- a/Source/WebCore/inspector/InspectorProfilerAgent.h
+++ b/Source/WebCore/inspector/InspectorProfilerAgent.h
@@ -32,6 +32,7 @@
#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
+#include "InspectorFrontend.h"
#include "PlatformString.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
@@ -41,48 +42,56 @@
namespace WebCore {
class InspectorArray;
-class InspectorAgent;
+class InspectorConsoleAgent;
class InspectorFrontend;
class InspectorObject;
+class InstrumentingAgents;
+class Page;
class ScriptHeapSnapshot;
class ScriptProfile;
+typedef String ErrorString;
+
class InspectorProfilerAgent {
WTF_MAKE_NONCOPYABLE(InspectorProfilerAgent); WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<InspectorProfilerAgent> create(InspectorAgent*);
+ static PassOwnPtr<InspectorProfilerAgent> create(InstrumentingAgents*, InspectorConsoleAgent*, Page*);
virtual ~InspectorProfilerAgent();
void addProfile(PassRefPtr<ScriptProfile> prpProfile, unsigned lineNumber, const String& sourceURL);
void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, const String& sourceURL);
- void clearProfiles() { resetState(); }
+ void clearProfiles(ErrorString*) { resetState(); }
void disable();
void enable(bool skipRecompile);
bool enabled() { return m_enabled; }
String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false);
- void getProfileHeaders(RefPtr<InspectorArray>* headers);
- void getProfile(const String& type, unsigned uid, RefPtr<InspectorObject>* profileObject);
+ void getExactHeapSnapshotNodeRetainedSize(ErrorString*, unsigned long uid, unsigned long nodeId, long* size);
+ void getProfileHeaders(ErrorString* error, RefPtr<InspectorArray>* headers);
+ void getProfile(ErrorString* error, const String& type, unsigned uid, RefPtr<InspectorObject>* profileObject);
bool isRecordingUserInitiatedProfile() { return m_recordingUserInitiatedProfile; }
- void removeProfile(const String& type, unsigned uid);
+ void removeProfile(ErrorString* error, const String& type, unsigned uid);
void resetState();
void resetFrontendProfiles();
- void setFrontend(InspectorFrontend* frontend) { m_frontend = frontend; }
+ void setFrontend(InspectorFrontend* frontend) { m_frontend = frontend->profiler(); }
+ void clearFrontend() { m_frontend = 0; }
void startUserInitiatedProfiling();
void stopUserInitiatedProfiling(bool ignoreProfile = false);
- void takeHeapSnapshot(bool detailed);
+ void takeHeapSnapshot(ErrorString* error, bool detailed);
void toggleRecordButton(bool isProfiling);
private:
typedef HashMap<unsigned int, RefPtr<ScriptProfile> > ProfilesMap;
typedef HashMap<unsigned int, RefPtr<ScriptHeapSnapshot> > HeapSnapshotsMap;
- InspectorProfilerAgent(InspectorAgent*);
+ InspectorProfilerAgent(InstrumentingAgents*, InspectorConsoleAgent*, Page*);
PassRefPtr<InspectorObject> createProfileHeader(const ScriptProfile& profile);
PassRefPtr<InspectorObject> createSnapshotHeader(const ScriptHeapSnapshot& snapshot);
- InspectorAgent* m_inspectorAgent;
- InspectorFrontend* m_frontend;
+ InstrumentingAgents* m_instrumentingAgents;
+ InspectorConsoleAgent* m_consoleAgent;
+ Page* m_inspectedPage;
+ InspectorFrontend::Profiler* m_frontend;
bool m_enabled;
bool m_recordingUserInitiatedProfile;
int m_currentUserInitiatedProfileNumber;