| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_ | |
| 6 #define V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_ | |
| 7 | |
| 8 #include "src/inspector/public/StringBuffer.h" | |
| 9 #include "src/inspector/public/StringView.h" | |
| 10 #include "src/inspector/public/protocol/Debugger.h" | |
| 11 #include "src/inspector/public/protocol/Runtime.h" | |
| 12 #include "src/inspector/public/protocol/Schema.h" | |
| 13 | |
| 14 #include <v8.h> | |
| 15 | |
| 16 namespace v8_inspector { | |
| 17 | |
| 18 class PLATFORM_EXPORT V8InspectorSession { | |
| 19 public: | |
| 20 virtual ~V8InspectorSession() {} | |
| 21 | |
| 22 // Cross-context inspectable values (DOM nodes in different worlds, etc.). | |
| 23 class Inspectable { | |
| 24 public: | |
| 25 virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0; | |
| 26 virtual ~Inspectable() {} | |
| 27 }; | |
| 28 virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0; | |
| 29 | |
| 30 // Dispatching protocol messages. | |
| 31 static bool canDispatchMethod(const StringView& method); | |
| 32 virtual void dispatchProtocolMessage(const StringView& message) = 0; | |
| 33 virtual std::unique_ptr<StringBuffer> stateJSON() = 0; | |
| 34 virtual std::vector<std::unique_ptr<protocol::Schema::API::Domain>> | |
| 35 supportedDomains() = 0; | |
| 36 | |
| 37 // Debugger actions. | |
| 38 virtual void schedulePauseOnNextStatement(const StringView& breakReason, | |
| 39 const StringView& breakDetails) = 0; | |
| 40 virtual void cancelPauseOnNextStatement() = 0; | |
| 41 virtual void breakProgram(const StringView& breakReason, | |
| 42 const StringView& breakDetails) = 0; | |
| 43 virtual void setSkipAllPauses(bool) = 0; | |
| 44 virtual void resume() = 0; | |
| 45 virtual void stepOver() = 0; | |
| 46 virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> | |
| 47 searchInTextByLines(const StringView& text, const StringView& query, | |
| 48 bool caseSensitive, bool isRegex) = 0; | |
| 49 | |
| 50 // Remote objects. | |
| 51 virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject( | |
| 52 v8::Local<v8::Context>, v8::Local<v8::Value>, | |
| 53 const StringView& groupName) = 0; | |
| 54 virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error, | |
| 55 const StringView& objectId, v8::Local<v8::Value>*, | |
| 56 v8::Local<v8::Context>*, | |
| 57 std::unique_ptr<StringBuffer>* objectGroup) = 0; | |
| 58 virtual void releaseObjectGroup(const StringView&) = 0; | |
| 59 }; | |
| 60 | |
| 61 } // namespace v8_inspector | |
| 62 | |
| 63 #endif // V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_ | |
| OLD | NEW |