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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgent.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/v8/V8ProfilerAgent.h
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgent.h b/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgent.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e375f98da4895aa8443cd527ec9432341e8d2f3
--- /dev/null
+++ b/third_party/WebKit/Source/core/inspector/v8/V8ProfilerAgent.h
@@ -0,0 +1,53 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8ProfilerAgent_h
+#define V8ProfilerAgent_h
+
+#include "core/CoreExport.h"
+#include "core/InspectorFrontend.h"
+#include "wtf/Forward.h"
+#include "wtf/Noncopyable.h"
+#include "wtf/text/WTFString.h"
+
+namespace v8 {
+class Isolate;
+}
+
+namespace blink {
+
+class InspectorState;
+
+typedef String ErrorString;
+
+class CORE_EXPORT V8ProfilerAgent {
+public:
+ static PassOwnPtr<V8ProfilerAgent> create(v8::Isolate*);
+ virtual ~V8ProfilerAgent() { }
+
+ // State management methods.
+ virtual void setInspectorState(InspectorState*) = 0;
+ virtual void setFrontend(InspectorFrontend::Profiler*) = 0;
+ virtual void clearFrontend() = 0;
+ virtual void restore() = 0;
+
+ // Protocol methods.
+ virtual void enable(ErrorString*) = 0;
+ virtual void disable(ErrorString*) = 0;
+ virtual void setSamplingInterval(ErrorString*, int) = 0;
+ virtual void start(ErrorString*) = 0;
+ virtual void stop(ErrorString*, RefPtr<TypeBuilder::Profiler::CPUProfile>&) = 0;
+
+ // API for the embedder.
+ virtual void consoleProfile(const String& title) = 0;
+ virtual void consoleProfileEnd(const String& title) = 0;
+
+ virtual void idleStarted() = 0;
+ virtual void idleFinished() = 0;
+};
+
+} // namespace blink
+
+
+#endif // !defined(V8ProfilerAgent_h)

Powered by Google App Engine
This is Rietveld 408576698