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 V8Inspector_h | 5 #ifndef SimpleInspector_h |
6 #define V8Inspector_h | 6 #define SimpleInspector_h |
7 | 7 |
8 #include "platform/inspector_protocol/Platform.h" | 8 #include "platform/inspector_protocol/Platform.h" |
9 #include "platform/v8_inspector/public/V8DebuggerClient.h" | 9 #include "platform/v8_inspector/public/V8InspectorClient.h" |
10 #include "platform/v8_inspector/public/V8InspectorSession.h" | 10 #include "platform/v8_inspector/public/V8InspectorSession.h" |
11 #include "platform/v8_inspector/public/V8InspectorSessionClient.h" | 11 #include "platform/v8_inspector/public/V8InspectorSessionClient.h" |
12 | 12 |
13 #include <v8.h> | 13 #include <v8.h> |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 | 16 |
17 namespace protocol { | 17 namespace protocol { |
18 class Dispatcher; | 18 class Dispatcher; |
19 class Frontend; | 19 class Frontend; |
20 class FrontendChannel; | 20 class FrontendChannel; |
21 } | 21 } |
22 | 22 |
23 class V8Debugger; | 23 class V8Inspector; |
24 class V8HeapProfilerAgent; | 24 class V8HeapProfilerAgent; |
25 class V8ProfilerAgent; | 25 class V8ProfilerAgent; |
26 | 26 |
27 class V8Inspector : public V8DebuggerClient, V8InspectorSessionClient { | 27 class SimpleInspector : public V8InspectorClient, V8InspectorSessionClient { |
28 public: | 28 public: |
29 V8Inspector(v8::Isolate*, v8::Local<v8::Context>); | 29 SimpleInspector(v8::Isolate*, v8::Local<v8::Context>); |
30 ~V8Inspector(); | 30 ~SimpleInspector(); |
31 | 31 |
32 // Transport interface. | 32 // Transport interface. |
33 void connectFrontend(protocol::FrontendChannel*); | 33 void connectFrontend(protocol::FrontendChannel*); |
34 void disconnectFrontend(); | 34 void disconnectFrontend(); |
35 void dispatchMessageFromFrontend(const String16& message); | 35 void dispatchMessageFromFrontend(const String16& message); |
36 void notifyContextDestroyed(); | 36 void notifyContextDestroyed(); |
37 | 37 |
38 private: | 38 private: |
39 String16 valueSubtype(v8::Local<v8::Value>) override; | 39 String16 valueSubtype(v8::Local<v8::Value>) override; |
40 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; | 40 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; |
(...skipping 22 matching lines...) Expand all Loading... |
63 void startRepeatingTimer(double, TimerCallback, void* data) override { } | 63 void startRepeatingTimer(double, TimerCallback, void* data) override { } |
64 void cancelTimer(void* data) override { } | 64 void cancelTimer(void* data) override { } |
65 | 65 |
66 // V8InspectorSessionClient | 66 // V8InspectorSessionClient |
67 void resumeStartup() override { }; | 67 void resumeStartup() override { }; |
68 bool canExecuteScripts() override; | 68 bool canExecuteScripts() override; |
69 void profilingStarted() override { }; | 69 void profilingStarted() override { }; |
70 void profilingStopped() override { }; | 70 void profilingStopped() override { }; |
71 void consoleCleared() override { }; | 71 void consoleCleared() override { }; |
72 | 72 |
73 std::unique_ptr<V8Debugger> m_debugger; | 73 std::unique_ptr<V8Inspector> m_inspector; |
74 std::unique_ptr<V8InspectorSession> m_session; | 74 std::unique_ptr<V8InspectorSession> m_session; |
75 String16 m_state; | 75 String16 m_state; |
76 v8::Local<v8::Context> m_context; | 76 v8::Local<v8::Context> m_context; |
77 }; | 77 }; |
78 | 78 |
79 } | 79 } |
80 | 80 |
81 #endif // V8Inspector_h | 81 #endif // SimpleInspector_h |
OLD | NEW |