| 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/UserGestureIndicator.h" | 10 #include "platform/UserGestureIndicator.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void cancelTimer(void* data) override; | 49 void cancelTimer(void* data) override; |
| 50 | 50 |
| 51 V8Debugger* debugger() const { return m_debugger.get(); } | 51 V8Debugger* debugger() const { return m_debugger.get(); } |
| 52 virtual bool isWorker() { return true; } | 52 virtual bool isWorker() { return true; } |
| 53 protected: | 53 protected: |
| 54 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c
onst char* name, v8::FunctionCallback, const char* description); | 54 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c
onst char* name, v8::FunctionCallback, const char* description); |
| 55 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*)
= 0; | 55 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*)
= 0; |
| 56 void onTimer(Timer<ThreadDebugger>*); | 56 void onTimer(Timer<ThreadDebugger>*); |
| 57 | 57 |
| 58 v8::Isolate* m_isolate; | 58 v8::Isolate* m_isolate; |
| 59 OwnPtr<V8Debugger> m_debugger; | 59 std::unique_ptr<V8Debugger> m_debugger; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 v8::Local<v8::Function> eventLogFunction(); | 62 v8::Local<v8::Function> eventLogFunction(); |
| 63 | 63 |
| 64 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu
e>&, bool enabled); | 64 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu
e>&, bool enabled); |
| 65 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&
); | 65 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&
); |
| 66 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value
>&); | 66 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value
>&); |
| 67 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 67 static void logCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
| 68 | 68 |
| 69 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val
ue>&); | 69 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val
ue>&); |
| 70 | 70 |
| 71 Vector<OwnPtr<Timer<ThreadDebugger>>> m_timers; | 71 Vector<OwnPtr<Timer<ThreadDebugger>>> m_timers; |
| 72 Vector<V8DebuggerClient::TimerCallback> m_timerCallbacks; | 72 Vector<V8DebuggerClient::TimerCallback> m_timerCallbacks; |
| 73 Vector<void*> m_timerData; | 73 Vector<void*> m_timerData; |
| 74 OwnPtr<UserGestureIndicator> m_userGestureIndicator; | 74 OwnPtr<UserGestureIndicator> m_userGestureIndicator; |
| 75 v8::Global<v8::Function> m_eventLogFunction; | 75 v8::Global<v8::Function> m_eventLogFunction; |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| 79 | 79 |
| 80 #endif // ThreadDebugger_h | 80 #endif // ThreadDebugger_h |
| OLD | NEW |