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

Side by Side Diff: Source/core/inspector/AsyncCallTracker.h

Issue 1286343003: DevTools: make InspectorDebuggerAgent aggregate V8DebuggerAgent instead of inheriting (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed presubmit errors Created 5 years, 4 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef AsyncCallTracker_h 31 #ifndef AsyncCallTracker_h
32 #define AsyncCallTracker_h 32 #define AsyncCallTracker_h
33 33
34 #include "core/CoreExport.h" 34 #include "core/CoreExport.h"
35 #include "core/inspector/InspectorDebuggerAgent.h" 35 #include "core/inspector/V8DebuggerAgent.h"
36 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 #include "wtf/HashMap.h" 38 #include "wtf/HashMap.h"
39 #include "wtf/Noncopyable.h" 39 #include "wtf/Noncopyable.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 class Event; 43 class Event;
44 class EventListener; 44 class EventListener;
45 class EventTarget; 45 class EventTarget;
46 class ExecutionContext; 46 class ExecutionContext;
47 class ExecutionContextTask; 47 class ExecutionContextTask;
48 class FormData; 48 class FormData;
49 class HTTPHeaderMap; 49 class HTTPHeaderMap;
50 class InspectorDebuggerAgent;
51 class KURL; 50 class KURL;
52 class MutationObserver; 51 class MutationObserver;
53 class ThreadableLoaderClient; 52 class ThreadableLoaderClient;
54 class XMLHttpRequest; 53 class XMLHttpRequest;
55 54
56 class CORE_EXPORT AsyncCallTracker final : public NoBaseWillBeGarbageCollectedFi nalized<AsyncCallTracker>, public InspectorDebuggerAgent::AsyncCallTrackingListe ner { 55 class CORE_EXPORT AsyncCallTracker final : public NoBaseWillBeGarbageCollectedFi nalized<AsyncCallTracker>, public V8DebuggerAgent::AsyncCallTrackingListener {
57 WTF_MAKE_NONCOPYABLE(AsyncCallTracker); 56 WTF_MAKE_NONCOPYABLE(AsyncCallTracker);
58 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AsyncCallTracker); 57 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(AsyncCallTracker);
59 public: 58 public:
60 AsyncCallTracker(InspectorDebuggerAgent*, InstrumentingAgents*); 59 AsyncCallTracker(V8DebuggerAgent*, InstrumentingAgents*);
61 ~AsyncCallTracker() override; 60 ~AsyncCallTracker() override;
62 61
63 // InspectorDebuggerAgent::AsyncCallTrackingListener implementation: 62 // V8DebuggerAgent::AsyncCallTrackingListener implementation:
64 void asyncCallTrackingStateChanged(bool tracking) override; 63 void asyncCallTrackingStateChanged(bool tracking) override;
65 void resetAsyncOperations() override; 64 void resetAsyncOperations() override;
66 65
67 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl eShot); 66 void didInstallTimer(ExecutionContext*, int timerId, int timeout, bool singl eShot);
68 void didRemoveTimer(ExecutionContext*, int timerId); 67 void didRemoveTimer(ExecutionContext*, int timerId);
69 bool willFireTimer(ExecutionContext*, int timerId); 68 bool willFireTimer(ExecutionContext*, int timerId);
70 void didFireTimer() { didFireAsyncCall(); } 69 void didFireTimer() { didFireAsyncCall(); }
71 70
72 void didRequestAnimationFrame(ExecutionContext*, int callbackId); 71 void didRequestAnimationFrame(ExecutionContext*, int callbackId);
73 void didCancelAnimationFrame(ExecutionContext*, int callbackId); 72 void didCancelAnimationFrame(ExecutionContext*, int callbackId);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 void willHandleXHREvent(XMLHttpRequest*, Event*); 105 void willHandleXHREvent(XMLHttpRequest*, Event*);
107 106
108 bool isKnownAsyncOperationId(ExecutionContext*, int operationId) const; 107 bool isKnownAsyncOperationId(ExecutionContext*, int operationId) const;
109 void willFireAsyncCall(int operationId); 108 void willFireAsyncCall(int operationId);
110 void didFireAsyncCall(); 109 void didFireAsyncCall();
111 110
112 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*); 111 ExecutionContextData* createContextDataIfNeeded(ExecutionContext*);
113 112
114 using ExecutionContextDataMap = WillBeHeapHashMap<RawPtrWillBeMember<Executi onContext>, OwnPtrWillBeMember<ExecutionContextData>>; 113 using ExecutionContextDataMap = WillBeHeapHashMap<RawPtrWillBeMember<Executi onContext>, OwnPtrWillBeMember<ExecutionContextData>>;
115 ExecutionContextDataMap m_executionContextDataMap; 114 ExecutionContextDataMap m_executionContextDataMap;
116 RawPtrWillBeMember<InspectorDebuggerAgent> m_debuggerAgent; 115 RawPtrWillBeMember<V8DebuggerAgent> m_debuggerAgent;
117 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents; 116 RawPtrWillBeMember<InstrumentingAgents> m_instrumentingAgents;
118 }; 117 };
119 118
120 } // namespace blink 119 } // namespace blink
121 120
122 #endif // AsyncCallTracker_h 121 #endif // AsyncCallTracker_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698