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/ConsoleTypes.h" | 9 #include "core/inspector/ConsoleTypes.h" |
10 #include "platform/Timer.h" | 10 #include "platform/Timer.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c
onst char* name, v8::FunctionCallback, const char* description); | 53 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c
onst char* name, v8::FunctionCallback, const char* description); |
54 static v8::Maybe<bool> createDataPropertyInArray(v8::Local<v8::Context>, v8:
:Local<v8::Array>, int index, v8::Local<v8::Value>); | 54 static v8::Maybe<bool> createDataPropertyInArray(v8::Local<v8::Context>, v8:
:Local<v8::Array>, int index, v8::Local<v8::Value>); |
55 static MessageLevel consoleAPITypeToMessageLevel(v8_inspector::V8ConsoleAPIT
ype); | 55 static MessageLevel consoleAPITypeToMessageLevel(v8_inspector::V8ConsoleAPIT
ype); |
56 | 56 |
57 v8::Isolate* m_isolate; | 57 v8::Isolate* m_isolate; |
58 | 58 |
59 private: | 59 private: |
60 // V8InspectorClient implementation. | 60 // V8InspectorClient implementation. |
61 void beginUserGesture() override; | 61 void beginUserGesture() override; |
62 void endUserGesture() override; | 62 void endUserGesture() override; |
63 String16 valueSubtype(v8::Local<v8::Value>) override; | 63 std::unique_ptr<v8_inspector::StringBuffer> valueSubtype(v8::Local<v8::Value
>) override; |
64 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; | 64 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; |
65 double currentTimeMS() override; | 65 double currentTimeMS() override; |
66 bool isInspectableHeapObject(v8::Local<v8::Object>) override; | 66 bool isInspectableHeapObject(v8::Local<v8::Object>) override; |
67 void consoleTime(const String16& title) override; | 67 void consoleTime(const v8_inspector::StringView& title) override; |
68 void consoleTimeEnd(const String16& title) override; | 68 void consoleTimeEnd(const v8_inspector::StringView& title) override; |
69 void consoleTimeStamp(const String16& title) override; | 69 void consoleTimeStamp(const v8_inspector::StringView& title) override; |
70 void startRepeatingTimer(double, v8_inspector::V8InspectorClient::TimerCallb
ack, void* data) override; | 70 void startRepeatingTimer(double, v8_inspector::V8InspectorClient::TimerCallb
ack, void* data) override; |
71 void cancelTimer(void* data) override; | 71 void cancelTimer(void* data) override; |
72 | 72 |
73 void onTimer(TimerBase*); | 73 void onTimer(TimerBase*); |
74 | 74 |
75 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu
e>&, bool enabled); | 75 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu
e>&, bool enabled); |
76 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&
); | 76 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>&
); |
77 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value
>&); | 77 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value
>&); |
78 | 78 |
79 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val
ue>&); | 79 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val
ue>&); |
80 | 80 |
81 std::unique_ptr<v8_inspector::V8Inspector> m_v8Inspector; | 81 std::unique_ptr<v8_inspector::V8Inspector> m_v8Inspector; |
82 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers; | 82 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers; |
83 Vector<v8_inspector::V8InspectorClient::TimerCallback> m_timerCallbacks; | 83 Vector<v8_inspector::V8InspectorClient::TimerCallback> m_timerCallbacks; |
84 Vector<void*> m_timerData; | 84 Vector<void*> m_timerData; |
85 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator; | 85 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator; |
86 }; | 86 }; |
87 | 87 |
88 } // namespace blink | 88 } // namespace blink |
89 | 89 |
90 #endif // ThreadDebugger_h | 90 #endif // ThreadDebugger_h |
OLD | NEW |