| 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>> supporte
dDomains() = 0; | |
| 35 | |
| 36 // Debugger actions. | |
| 37 virtual void schedulePauseOnNextStatement(const StringView& breakReason, con
st StringView& breakDetails) = 0; | |
| 38 virtual void cancelPauseOnNextStatement() = 0; | |
| 39 virtual void breakProgram(const StringView& breakReason, const StringView& b
reakDetails) = 0; | |
| 40 virtual void setSkipAllPauses(bool) = 0; | |
| 41 virtual void resume() = 0; | |
| 42 virtual void stepOver() = 0; | |
| 43 virtual std::vector<std::unique_ptr<protocol::Debugger::API::SearchMatch>> s
earchInTextByLines(const StringView& text, const StringView& query, bool caseSen
sitive, bool isRegex) = 0; | |
| 44 | |
| 45 // Remote objects. | |
| 46 virtual std::unique_ptr<protocol::Runtime::API::RemoteObject> wrapObject(v8:
:Local<v8::Context>, v8::Local<v8::Value>, const StringView& groupName) = 0; | |
| 47 virtual bool unwrapObject(std::unique_ptr<StringBuffer>* error, const String
View& objectId, v8::Local<v8::Value>*, v8::Local<v8::Context>*, std::unique_ptr<
StringBuffer>* objectGroup) = 0; | |
| 48 virtual void releaseObjectGroup(const StringView&) = 0; | |
| 49 }; | |
| 50 | |
| 51 } // namespace v8_inspector | |
| 52 | |
| 53 #endif // V8_INSPECTOR_PUBLIC_V8INSPECTORSESSION_H_ | |
| OLD | NEW |