OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 V8InspectorSession_h | 5 #ifndef V8InspectorSession_h |
6 #define V8InspectorSession_h | 6 #define V8InspectorSession_h |
7 | 7 |
8 #include "platform/inspector_protocol/InspectorProtocol.h" | 8 #include "platform/inspector_protocol/InspectorProtocol.h" |
9 #include "platform/v8_inspector/public/protocol/Debugger.h" | 9 #include "platform/v8_inspector/public/protocol/Debugger.h" |
10 #include "platform/v8_inspector/public/protocol/Runtime.h" | 10 #include "platform/v8_inspector/public/protocol/Runtime.h" |
| 11 #include "platform/v8_inspector/public/protocol/Schema.h" |
11 | 12 |
12 #include <v8.h> | 13 #include <v8.h> |
13 | 14 |
14 namespace v8_inspector { | 15 namespace v8_inspector { |
15 | 16 |
16 class PLATFORM_EXPORT V8InspectorSession { | 17 class PLATFORM_EXPORT V8InspectorSession { |
17 public: | 18 public: |
18 virtual ~V8InspectorSession() { } | 19 virtual ~V8InspectorSession() { } |
19 | 20 |
20 // Cross-context inspectable values (DOM nodes in different worlds, etc.). | 21 // Cross-context inspectable values (DOM nodes in different worlds, etc.). |
21 class Inspectable { | 22 class Inspectable { |
22 public: | 23 public: |
23 virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0; | 24 virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0; |
24 virtual ~Inspectable() { } | 25 virtual ~Inspectable() { } |
25 }; | 26 }; |
26 virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0; | 27 virtual void addInspectedObject(std::unique_ptr<Inspectable>) = 0; |
27 | 28 |
28 // Dispatching protocol messages. | 29 // Dispatching protocol messages. |
29 static bool canDispatchMethod(const String16& method); | 30 static bool canDispatchMethod(const String16& method); |
30 virtual void dispatchProtocolMessage(const String16& message) = 0; | 31 virtual void dispatchProtocolMessage(const String16& message) = 0; |
31 virtual String16 stateJSON() = 0; | 32 virtual String16 stateJSON() = 0; |
| 33 virtual std::unique_ptr<blink::protocol::Array<blink::protocol::Schema::API:
:Domain>> supportedDomains() = 0; |
32 | 34 |
33 // Debugger actions. | 35 // Debugger actions. |
34 virtual void schedulePauseOnNextStatement(const String16& breakReason, const
String16& breakDetails) = 0; | 36 virtual void schedulePauseOnNextStatement(const String16& breakReason, const
String16& breakDetails) = 0; |
35 virtual void cancelPauseOnNextStatement() = 0; | 37 virtual void cancelPauseOnNextStatement() = 0; |
36 virtual void breakProgram(const String16& breakReason, const String16& break
Details) = 0; | 38 virtual void breakProgram(const String16& breakReason, const String16& break
Details) = 0; |
37 virtual void setSkipAllPauses(bool) = 0; | 39 virtual void setSkipAllPauses(bool) = 0; |
38 virtual void resume() = 0; | 40 virtual void resume() = 0; |
39 virtual void stepOver() = 0; | 41 virtual void stepOver() = 0; |
40 virtual std::unique_ptr<blink::protocol::Array<blink::protocol::Debugger::AP
I::SearchMatch>> searchInTextByLines(const String16& text, const String16& query
, bool caseSensitive, bool isRegex) = 0; | 42 virtual std::unique_ptr<blink::protocol::Array<blink::protocol::Debugger::AP
I::SearchMatch>> searchInTextByLines(const String16& text, const String16& query
, bool caseSensitive, bool isRegex) = 0; |
41 | 43 |
42 // Remote objects. | 44 // Remote objects. |
43 virtual std::unique_ptr<blink::protocol::Runtime::API::RemoteObject> wrapObj
ect(v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName) = 0
; | 45 virtual std::unique_ptr<blink::protocol::Runtime::API::RemoteObject> wrapObj
ect(v8::Local<v8::Context>, v8::Local<v8::Value>, const String16& groupName) = 0
; |
44 virtual bool unwrapObject(ErrorString*, const String16& objectId, v8::Local<
v8::Value>*, v8::Local<v8::Context>*, String16* objectGroup) = 0; | 46 virtual bool unwrapObject(ErrorString*, const String16& objectId, v8::Local<
v8::Value>*, v8::Local<v8::Context>*, String16* objectGroup) = 0; |
45 virtual void releaseObjectGroup(const String16&) = 0; | 47 virtual void releaseObjectGroup(const String16&) = 0; |
46 }; | 48 }; |
47 | 49 |
48 } // namespace v8_inspector | 50 } // namespace v8_inspector |
49 | 51 |
50 #endif // V8InspectorSession_h | 52 #endif // V8InspectorSession_h |
OLD | NEW |