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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h

Issue 1405823002: DevTools: extract Blink-independent part of CPU profiler into V8ProfilerAgent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check if client is present before calling its methods Created 5 years, 2 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: third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h b/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h
index 61640db78d5563d0e4af050a820a036d0e6dc4e1..2da64d3114f0f1719d548a94ebb1a3b650e315d9 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.h
@@ -34,20 +34,15 @@
#include "core/InspectorFrontend.h"
#include "core/inspector/InspectorBaseAgent.h"
#include "wtf/Forward.h"
-#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/text/WTFString.h"
-namespace v8 {
-class CpuProfile;
-}
-
namespace blink {
class ExecutionContext;
-class InjectedScriptManager;
class InspectorFrontend;
+class V8ProfilerAgent;
typedef String ErrorString;
@@ -62,47 +57,35 @@ public:
virtual void profilingStopped() { }
};
- static PassOwnPtrWillBeRawPtr<InspectorProfilerAgent> create(v8::Isolate*, InjectedScriptManager*, Client*);
+ static PassOwnPtrWillBeRawPtr<InspectorProfilerAgent> create(v8::Isolate*, Client*);
~InspectorProfilerAgent() override;
DECLARE_VIRTUAL_TRACE();
+ // InspectorBaseAgent overrides.
+ void init() override;
+ void setFrontend(InspectorFrontend*) override;
+ void clearFrontend() override;
+ void restore() override;
+
void consoleProfile(ExecutionContext*, const String& title);
void consoleProfileEnd(const String& title);
void enable(ErrorString*) override;
+ void disable(ErrorString*) override;
void setSamplingInterval(ErrorString*, int) override;
void start(ErrorString*) override;
void stop(ErrorString*, RefPtr<TypeBuilder::Profiler::CPUProfile>&) override;
- void disable(ErrorString*) override;
- void restore() override;
-
void willProcessTask();
void didProcessTask();
void willEnterNestedRunLoop();
void didLeaveNestedRunLoop();
private:
- InspectorProfilerAgent(v8::Isolate*, InjectedScriptManager*, Client*);
- bool enabled();
- void doEnable();
- void stop(ErrorString*, RefPtr<TypeBuilder::Profiler::CPUProfile>*);
- String nextProfileId();
-
- void startProfiling(const String& title);
- PassRefPtr<TypeBuilder::Profiler::CPUProfile> stopProfiling(const String& title, bool serialize);
-
- bool isRecording() const;
- void idleStarted();
- void idleFinished();
-
- v8::Isolate* m_isolate;
- RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager;
- bool m_recordingCPUProfile;
- class ProfileDescriptor;
- Vector<ProfileDescriptor> m_startedProfiles;
- String m_frontendInitiatedProfileId;
+ InspectorProfilerAgent(v8::Isolate*, Client*);
+
Client* m_client;
+ OwnPtr<V8ProfilerAgent> m_v8ProfilerAgent;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/inspector/InspectorProfilerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698