Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: third_party/WebKit/Source/core/inspector/ThreadDebugger.h

Issue 1950403002: Add the ability to return descedant event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 class CORE_EXPORT ThreadDebugger : public V8DebuggerClient { 22 class CORE_EXPORT ThreadDebugger : public V8DebuggerClient {
23 WTF_MAKE_NONCOPYABLE(ThreadDebugger); 23 WTF_MAKE_NONCOPYABLE(ThreadDebugger);
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>, unsigned filterMask, V8EventListen erInfoList&) 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; 34 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override;
35 bool isExecutionAllowed() override; 35 bool isExecutionAllowed() override;
36 double currentTimeMS() override; 36 double currentTimeMS() override;
37 bool isInspectableHeapObject(v8::Local<v8::Object>) override; 37 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; 38 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; 39 void consoleTime(const String16& title) override;
40 void consoleTimeEnd(const String16& title) override; 40 void consoleTimeEnd(const String16& title) override;
41 void consoleTimeStamp(const String16& title) override; 41 void consoleTimeStamp(const String16& title) override;
42 int startRepeatingTimer(double, PassOwnPtr<V8DebuggerClient::TimerCallback>) override; 42 int startRepeatingTimer(double, PassOwnPtr<V8DebuggerClient::TimerCallback>) override;
43 void cancelTimer(int) override; 43 void cancelTimer(int) override;
44 44
45 V8Debugger* debugger() const { return m_debugger.get(); } 45 V8Debugger* debugger() const { return m_debugger.get(); }
46 virtual bool isWorker() { return true; } 46 virtual bool isWorker() { return true; }
47 protected: 47 protected:
48 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*) = 0; 48 virtual void reportMessageToConsole(v8::Local<v8::Context>, ConsoleMessage*) = 0;
49 void onTimer(Timer<ThreadDebugger>*); 49 void onTimer(Timer<ThreadDebugger>*);
50 50
51 v8::Isolate* m_isolate; 51 v8::Isolate* m_isolate;
52 OwnPtr<V8Debugger> m_debugger; 52 OwnPtr<V8Debugger> m_debugger;
53 HashMap<int, OwnPtr<Timer<ThreadDebugger>>> m_timers; 53 HashMap<int, OwnPtr<Timer<ThreadDebugger>>> m_timers;
54 HashMap<Timer<ThreadDebugger>*, OwnPtr<V8DebuggerClient::TimerCallback>> m_t imerCallbacks; 54 HashMap<Timer<ThreadDebugger>*, OwnPtr<V8DebuggerClient::TimerCallback>> m_t imerCallbacks;
55 int m_lastTimerId; 55 int m_lastTimerId;
56 }; 56 };
57 57
58 } // namespace blink 58 } // namespace blink
59 59
60 #endif // ThreadDebugger_h 60 #endif // ThreadDebugger_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698