OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8Inspector_h | 5 #ifndef V8Inspector_h |
6 #define V8Inspector_h | 6 #define V8Inspector_h |
7 | 7 |
8 #include "platform/v8_inspector/public/StringView.h" | 8 #include "platform/v8_inspector/public/StringView.h" |
9 #include "platform/v8_inspector/public/V8ContextInfo.h" | 9 #include "platform/v8_inspector/public/V8ContextInfo.h" |
10 | 10 |
11 #include <v8.h> | 11 #include <v8.h> |
12 | 12 |
13 namespace blink { namespace protocol { class FrontendChannel; }} | |
14 | |
15 namespace v8_inspector { | 13 namespace v8_inspector { |
16 | 14 |
17 class V8InspectorClient; | 15 class V8InspectorClient; |
18 class V8InspectorSession; | 16 class V8InspectorSession; |
19 class V8StackTrace; | 17 class V8StackTrace; |
20 | 18 |
21 class PLATFORM_EXPORT V8Inspector { | 19 class PLATFORM_EXPORT V8Inspector { |
22 public: | 20 public: |
23 static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*)
; | 21 static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*)
; |
24 virtual ~V8Inspector() { } | 22 virtual ~V8Inspector() { } |
(...skipping 13 matching lines...) Expand all Loading... |
38 virtual void asyncTaskScheduled(const StringView& taskName, void* task, bool
recurring) = 0; | 36 virtual void asyncTaskScheduled(const StringView& taskName, void* task, bool
recurring) = 0; |
39 virtual void asyncTaskCanceled(void* task) = 0; | 37 virtual void asyncTaskCanceled(void* task) = 0; |
40 virtual void asyncTaskStarted(void* task) = 0; | 38 virtual void asyncTaskStarted(void* task) = 0; |
41 virtual void asyncTaskFinished(void* task) = 0; | 39 virtual void asyncTaskFinished(void* task) = 0; |
42 virtual void allAsyncTasksCanceled() = 0; | 40 virtual void allAsyncTasksCanceled() = 0; |
43 | 41 |
44 // Exceptions instrumentation. | 42 // Exceptions instrumentation. |
45 virtual unsigned exceptionThrown(v8::Local<v8::Context>, const StringView& m
essage, v8::Local<v8::Value> exception, const StringView& detailedMessage, const
StringView& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8
StackTrace>, int scriptId) = 0; | 43 virtual unsigned exceptionThrown(v8::Local<v8::Context>, const StringView& m
essage, v8::Local<v8::Value> exception, const StringView& detailedMessage, const
StringView& url, unsigned lineNumber, unsigned columnNumber, std::unique_ptr<V8
StackTrace>, int scriptId) = 0; |
46 virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId,
const StringView& message) = 0; | 44 virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId,
const StringView& message) = 0; |
47 | 45 |
| 46 // Connection. |
| 47 class PLATFORM_EXPORT Channel { |
| 48 public: |
| 49 virtual ~Channel() { } |
| 50 virtual void sendProtocolResponse(int callId, const StringView& message)
= 0; |
| 51 virtual void sendProtocolNotification(const StringView& message) = 0; |
| 52 virtual void flushProtocolNotifications() = 0; |
| 53 }; |
| 54 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, Chan
nel*, const StringView& state) = 0; |
| 55 |
48 // API methods. | 56 // API methods. |
49 virtual std::unique_ptr<V8InspectorSession> connect(int contextGroupId, blin
k::protocol::FrontendChannel*, const StringView& state) = 0; | |
50 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr
ace>) = 0; | 57 virtual std::unique_ptr<V8StackTrace> createStackTrace(v8::Local<v8::StackTr
ace>) = 0; |
51 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; | 58 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; |
52 }; | 59 }; |
53 | 60 |
54 } // namespace v8_inspector | 61 } // namespace v8_inspector |
55 | 62 |
56 | 63 |
57 #endif // V8Inspector_h | 64 #endif // V8Inspector_h |
OLD | NEW |