| 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 "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/inspector/v8/V8Debugger.h" | 9 #include "core/inspector/v8/V8Debugger.h" |
| 10 #include "core/inspector/v8/V8DebuggerClient.h" | 10 #include "core/inspector/v8/V8DebuggerClient.h" |
| 11 #include "wtf/Forward.h" | 11 #include "wtf/Forward.h" |
| 12 | 12 |
| 13 #include <v8.h> | 13 #include <v8.h> |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 class WorkerThread; | 17 class WorkerThread; |
| 18 | 18 |
| 19 class CORE_EXPORT ThreadDebugger : public V8DebuggerClient { | 19 class CORE_EXPORT ThreadDebugger : public V8DebuggerClient { |
| 20 WTF_MAKE_NONCOPYABLE(ThreadDebugger); | 20 WTF_MAKE_NONCOPYABLE(ThreadDebugger); |
| 21 public: | 21 public: |
| 22 explicit ThreadDebugger(v8::Isolate*); | 22 explicit ThreadDebugger(v8::Isolate*); |
| 23 ~ThreadDebugger() override; | 23 ~ThreadDebugger() override; |
| 24 | 24 |
| 25 // V8DebuggerClient implementation. | 25 // V8DebuggerClient implementation. |
| 26 v8::Local<v8::Object> compileDebuggerScript() override; |
| 26 void eventListeners(v8::Local<v8::Value>, EventListenerInfoMap&) override; | 27 void eventListeners(v8::Local<v8::Value>, EventListenerInfoMap&) override; |
| 27 v8::MaybeLocal<v8::Value> compileAndRunInternalScript(const String& script)
override; | |
| 28 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, v8::Local<v8
::Context>, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]
) override; | 28 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, v8::Local<v8
::Context>, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]
) override; |
| 29 v8::MaybeLocal<v8::Value> callInternalFunction(v8::Local<v8::Function>, v8::
Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[]) override; | |
| 30 | 29 |
| 31 V8Debugger* debugger() const { return m_debugger.get(); } | 30 V8Debugger* debugger() const { return m_debugger.get(); } |
| 32 | 31 |
| 33 protected: | 32 protected: |
| 34 v8::Isolate* m_isolate; | 33 v8::Isolate* m_isolate; |
| 35 OwnPtr<V8Debugger> m_debugger; | 34 OwnPtr<V8Debugger> m_debugger; |
| 36 }; | 35 }; |
| 37 | 36 |
| 38 } // namespace blink | 37 } // namespace blink |
| 39 | 38 |
| 40 #endif // ThreadDebugger_h | 39 #endif // ThreadDebugger_h |
| OLD | NEW |