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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSession.h

Issue 1924663006: [DevTools] Move API methods from V8RuntimeAgent to V8InspectorSession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@debugger-into-session
Patch Set: rebased Created 4 years, 8 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/platform/v8_inspector/public/V8InspectorSession.h
diff --git a/third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSession.h b/third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSession.h
index c3fb2df53bd35517d02c0a6fcc0413abfc4ff49d..fc8c73ca7a6b80436281c1f843ff032dbc86860e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSession.h
+++ b/third_party/WebKit/Source/platform/v8_inspector/public/V8InspectorSession.h
@@ -6,8 +6,11 @@
#define V8InspectorSession_h
#include "platform/PlatformExport.h"
+#include "platform/inspector_protocol/TypeBuilder.h"
#include "wtf/PassOwnPtr.h"
+#include <v8.h>
+
namespace blink {
class V8DebuggerAgent;
@@ -19,9 +22,18 @@ class V8RuntimeAgent;
class PLATFORM_EXPORT V8InspectorSession {
public:
static const char backtraceObjectGroup[];
+
+ // Cross-context inspectable values (DOM nodes in different worlds, etc.).
+ class Inspectable {
+ public:
+ virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
+ virtual ~Inspectable() { }
+ };
+
virtual ~V8InspectorSession() { }
virtual void setClient(V8InspectorSessionClient*) = 0;
+ virtual void addInspectedObject(PassOwnPtr<Inspectable>) = 0;
// API for the embedder to report native activities.
virtual void schedulePauseOnNextStatement(const String16& breakReason, PassOwnPtr<protocol::DictionaryValue> data) = 0;
@@ -30,13 +42,20 @@ public:
virtual void breakProgramOnException(const String16& breakReason, PassOwnPtr<protocol::DictionaryValue> data) = 0;
virtual void setSkipAllPauses(bool) = 0;
- // Async call stacks implementation.
+ // API to report async call stacks.
virtual void asyncTaskScheduled(const String16& taskName, void* task, bool recurring) = 0;
virtual void asyncTaskCanceled(void* task) = 0;
virtual void asyncTaskStarted(void* task) = 0;
virtual void asyncTaskFinished(void* task) = 0;
virtual void allAsyncTasksCanceled() = 0;
+ // API to work with remote objects.
+ virtual PassOwnPtr<protocol::Runtime::RemoteObject> wrapObject(v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName, bool generatePreview = false) = 0;
+ // FIXME: remove when InspectorConsoleAgent moves into V8 inspector.
+ virtual PassOwnPtr<protocol::Runtime::RemoteObject> wrapTable(v8::Local<v8::Context>, v8::Local<v8::Value> table, v8::Local<v8::Value> columns) = 0;
+ virtual v8::Local<v8::Value> findObject(ErrorString*, const String16& objectId, v8::Local<v8::Context>* = nullptr, String16* objectGroup = nullptr) = 0;
+ virtual void releaseObjectGroup(const String16&) = 0;
+
virtual V8DebuggerAgent* debuggerAgent() = 0;
virtual V8HeapProfilerAgent* heapProfilerAgent() = 0;
virtual V8ProfilerAgent* profilerAgent() = 0;

Powered by Google App Engine
This is Rietveld 408576698