| 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 ThreadDebugger_h | 5 #ifndef ThreadDebugger_h |
| 6 #define ThreadDebugger_h | 6 #define ThreadDebugger_h |
| 7 | 7 |
| 8 #include <v8-inspector.h> |
| 9 #include <v8-profiler.h> |
| 10 #include <v8.h> |
| 11 #include <memory> |
| 12 #include "bindings/core/v8/V8PerIsolateData.h" |
| 8 #include "core/CoreExport.h" | 13 #include "core/CoreExport.h" |
| 9 #include "core/inspector/ConsoleTypes.h" | 14 #include "core/inspector/ConsoleTypes.h" |
| 10 #include "platform/Timer.h" | 15 #include "platform/Timer.h" |
| 11 #include "platform/UserGestureIndicator.h" | 16 #include "platform/UserGestureIndicator.h" |
| 12 #include "wtf/Forward.h" | 17 #include "wtf/Forward.h" |
| 13 #include "wtf/Vector.h" | 18 #include "wtf/Vector.h" |
| 14 #include <memory> | |
| 15 #include <v8-inspector.h> | |
| 16 #include <v8-profiler.h> | |
| 17 #include <v8.h> | |
| 18 | 19 |
| 19 namespace blink { | 20 namespace blink { |
| 20 | 21 |
| 21 class ExecutionContext; | 22 class ExecutionContext; |
| 22 class SourceLocation; | 23 class SourceLocation; |
| 23 | 24 |
| 24 // TODO(dgozman): rename this to ThreadInspector (and subclasses). | 25 // TODO(dgozman): rename this to ThreadInspector (and subclasses). |
| 25 class CORE_EXPORT ThreadDebugger : public v8_inspector::V8InspectorClient { | 26 class CORE_EXPORT ThreadDebugger : public v8_inspector::V8InspectorClient, |
| 27 public V8PerIsolateData::Data { |
| 26 WTF_MAKE_NONCOPYABLE(ThreadDebugger); | 28 WTF_MAKE_NONCOPYABLE(ThreadDebugger); |
| 27 | 29 |
| 28 public: | 30 public: |
| 29 explicit ThreadDebugger(v8::Isolate*); | 31 explicit ThreadDebugger(v8::Isolate*); |
| 30 ~ThreadDebugger() override; | 32 ~ThreadDebugger() override; |
| 31 | 33 |
| 32 static ThreadDebugger* from(v8::Isolate*); | 34 static ThreadDebugger* from(v8::Isolate*); |
| 33 virtual bool isWorker() = 0; | 35 virtual bool isWorker() = 0; |
| 34 v8_inspector::V8Inspector* v8Inspector() const { return m_v8Inspector.get(); } | 36 v8_inspector::V8Inspector* v8Inspector() const { return m_v8Inspector.get(); } |
| 35 | 37 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 std::unique_ptr<v8::TracingCpuProfiler> m_v8TracingCpuProfiler; | 108 std::unique_ptr<v8::TracingCpuProfiler> m_v8TracingCpuProfiler; |
| 107 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers; | 109 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers; |
| 108 Vector<v8_inspector::V8InspectorClient::TimerCallback> m_timerCallbacks; | 110 Vector<v8_inspector::V8InspectorClient::TimerCallback> m_timerCallbacks; |
| 109 Vector<void*> m_timerData; | 111 Vector<void*> m_timerData; |
| 110 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator; | 112 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator; |
| 111 }; | 113 }; |
| 112 | 114 |
| 113 } // namespace blink | 115 } // namespace blink |
| 114 | 116 |
| 115 #endif // ThreadDebugger_h | 117 #endif // ThreadDebugger_h |
| OLD | NEW |