| 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, | 251 virtual void sendProtocolResponse(int callId, const StringView& message) {} |
| 252 const StringView& message) = 0; | 252 virtual void sendProtocolNotification(const StringView& message) {} |
| 253 virtual void sendProtocolNotification(const StringView& message) = 0; | 253 virtual void sendResponse(int callId, |
| 254 std::unique_ptr<StringBuffer> message) { |
| 255 sendProtocolResponse(callId, message->string()); |
| 256 } |
| 257 virtual void sendNotification(std::unique_ptr<StringBuffer> message) { |
| 258 sendProtocolNotification(message->string()); |
| 259 } |
| 254 virtual void flushProtocolNotifications() = 0; | 260 virtual void flushProtocolNotifications() = 0; |
| 255 }; | 261 }; |
| 256 virtual std::unique_ptr<V8InspectorSession> connect( | 262 virtual std::unique_ptr<V8InspectorSession> connect( |
| 257 int contextGroupId, Channel*, const StringView& state) = 0; | 263 int contextGroupId, Channel*, const StringView& state) = 0; |
| 258 | 264 |
| 259 // API methods. | 265 // API methods. |
| 260 virtual std::unique_ptr<V8StackTrace> createStackTrace( | 266 virtual std::unique_ptr<V8StackTrace> createStackTrace( |
| 261 v8::Local<v8::StackTrace>) = 0; | 267 v8::Local<v8::StackTrace>) = 0; |
| 262 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; | 268 virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0; |
| 263 }; | 269 }; |
| 264 | 270 |
| 265 } // namespace v8_inspector | 271 } // namespace v8_inspector |
| 266 | 272 |
| 267 #endif // V8_V8_INSPECTOR_H_ | 273 #endif // V8_V8_INSPECTOR_H_ |
| OLD | NEW |