OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 V8_V8_INSPECTOR_H_ | 5 #ifndef V8_V8_INSPECTOR_H_ |
6 #define V8_V8_INSPECTOR_H_ | 6 #define V8_V8_INSPECTOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <cctype> | 9 #include <cctype> |
10 | 10 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 v8::Local<v8::Value> exception, const StringView& detailedMessage, | 241 v8::Local<v8::Value> exception, const StringView& detailedMessage, |
242 const StringView& url, unsigned lineNumber, unsigned columnNumber, | 242 const StringView& url, unsigned lineNumber, unsigned columnNumber, |
243 std::unique_ptr<V8StackTrace>, int scriptId) = 0; | 243 std::unique_ptr<V8StackTrace>, int scriptId) = 0; |
244 virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId, | 244 virtual void exceptionRevoked(v8::Local<v8::Context>, unsigned exceptionId, |
245 const StringView& message) = 0; | 245 const StringView& message) = 0; |
246 | 246 |
247 // Connection. | 247 // Connection. |
248 class V8_EXPORT Channel { | 248 class V8_EXPORT Channel { |
249 public: | 249 public: |
250 virtual ~Channel() {} | 250 virtual ~Channel() {} |
251 virtual void sendProtocolResponse(int callId, const StringView& message) {} | |
252 virtual void sendProtocolNotification(const StringView& message) {} | |
253 virtual void sendResponse(int callId, | 251 virtual void sendResponse(int callId, |
254 std::unique_ptr<StringBuffer> message) { | 252 std::unique_ptr<StringBuffer> message) = 0; |
255 sendProtocolResponse(callId, message->string()); | 253 virtual void sendNotification(std::unique_ptr<StringBuffer> message) = 0; |
256 } | |
257 virtual void sendNotification(std::unique_ptr<StringBuffer> message) { | |
258 sendProtocolNotification(message->string()); | |
259 } | |
260 virtual void flushProtocolNotifications() = 0; | 254 virtual void flushProtocolNotifications() = 0; |
261 }; | 255 }; |
262 virtual std::unique_ptr<V8InspectorSession> connect( | 256 virtual std::unique_ptr<V8InspectorSession> connect( |
263 int contextGroupId, Channel*, const StringView& state) = 0; | 257 int contextGroupId, Channel*, const StringView& state) = 0; |
264 | 258 |
265 // API methods. | 259 // API methods. |
266 virtual std::unique_ptr<V8StackTrace> createStackTrace( | 260 virtual std::unique_ptr<V8StackTrace> createStackTrace( |
267 v8::Local<v8::StackTrace>) = 0; | 261 v8::Local<v8::StackTrace>) = 0; |
268 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; | 262 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; |
269 }; | 263 }; |
270 | 264 |
271 } // namespace v8_inspector | 265 } // namespace v8_inspector |
272 | 266 |
273 #endif // V8_V8_INSPECTOR_H_ | 267 #endif // V8_V8_INSPECTOR_H_ |
OLD | NEW |