| 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 "platform/Timer.h" | 9 #include "platform/Timer.h" |
| 10 #include "platform/v8_inspector/public/V8Debugger.h" | 10 #include "platform/v8_inspector/public/V8Debugger.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 explicit ThreadDebugger(v8::Isolate*); | 25 explicit ThreadDebugger(v8::Isolate*); |
| 26 ~ThreadDebugger() override; | 26 ~ThreadDebugger() override; |
| 27 | 27 |
| 28 static void willExecuteScript(v8::Isolate*, int scriptId); | 28 static void willExecuteScript(v8::Isolate*, int scriptId); |
| 29 static void didExecuteScript(v8::Isolate*); | 29 static void didExecuteScript(v8::Isolate*); |
| 30 | 30 |
| 31 // V8DebuggerClient implementation. | 31 // V8DebuggerClient implementation. |
| 32 void eventListeners(v8::Local<v8::Value>, V8EventListenerInfoList&) override
; | 32 void eventListeners(v8::Local<v8::Value>, V8EventListenerInfoList&) override
; |
| 33 String16 valueSubtype(v8::Local<v8::Value>) override; | 33 String16 valueSubtype(v8::Local<v8::Value>) override; |
| 34 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; | |
| 35 bool isExecutionAllowed() override; | 34 bool isExecutionAllowed() override; |
| 36 double currentTimeMS() override; | 35 double currentTimeMS() override; |
| 37 bool isInspectableHeapObject(v8::Local<v8::Object>) override; | 36 bool isInspectableHeapObject(v8::Local<v8::Object>) override; |
| 38 void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLeve
l, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments
, unsigned skipArgumentCount, int maxStackSize) final; | 37 void reportMessageToConsole(v8::Local<v8::Context>, MessageType, MessageLeve
l, const String16& message, const v8::FunctionCallbackInfo<v8::Value>* arguments
, unsigned skipArgumentCount, int maxStackSize) final; |
| 39 void consoleTime(const String16& title) override; | 38 void consoleTime(const String16& title) override; |
| 40 void consoleTimeEnd(const String16& title) override; | 39 void consoleTimeEnd(const String16& title) override; |
| 41 void consoleTimeStamp(const String16& title) override; | 40 void consoleTimeStamp(const String16& title) override; |
| 42 int startRepeatingTimer(double, PassOwnPtr<V8DebuggerClient::TimerCallback>)
override; | 41 int startRepeatingTimer(double, PassOwnPtr<V8DebuggerClient::TimerCallback>)
override; |
| 43 void cancelTimer(int) override; | 42 void cancelTimer(int) override; |
| 44 | 43 |
| 45 V8Debugger* debugger() const { return m_debugger.get(); } | 44 V8Debugger* debugger() const { return m_debugger.get(); } |
| 46 virtual bool isWorker() { return true; } | 45 virtual bool isWorker() { return true; } |
| 47 protected: | 46 protected: |
| 48 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*)
= 0; | 47 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*)
= 0; |
| 49 void onTimer(Timer<ThreadDebugger>*); | 48 void onTimer(Timer<ThreadDebugger>*); |
| 50 | 49 |
| 51 v8::Isolate* m_isolate; | 50 v8::Isolate* m_isolate; |
| 52 OwnPtr<V8Debugger> m_debugger; | 51 OwnPtr<V8Debugger> m_debugger; |
| 53 HashMap<int, OwnPtr<Timer<ThreadDebugger>>> m_timers; | 52 HashMap<int, OwnPtr<Timer<ThreadDebugger>>> m_timers; |
| 54 HashMap<Timer<ThreadDebugger>*, OwnPtr<V8DebuggerClient::TimerCallback>> m_t
imerCallbacks; | 53 HashMap<Timer<ThreadDebugger>*, OwnPtr<V8DebuggerClient::TimerCallback>> m_t
imerCallbacks; |
| 55 int m_lastTimerId; | 54 int m_lastTimerId; |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 } // namespace blink | 57 } // namespace blink |
| 59 | 58 |
| 60 #endif // ThreadDebugger_h | 59 #endif // ThreadDebugger_h |
| OLD | NEW |