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

Unified Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 2729613008: [instrumentation] Introduce InspectorTraceEvents agent (Closed)
Patch Set: all done Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
index 2f1df5b1efa90b09e958bc500182999cd0381405..e68acb79f9b592ec0308b2a9a3213e276f0feb42 100644
--- a/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp
@@ -30,6 +30,9 @@
#include "web/WebDevToolsAgentImpl.h"
+#include <v8-inspector.h>
+#include <memory>
+
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/V8Binding.h"
#include "core/InstrumentingAgents.h"
@@ -89,8 +92,6 @@
#include "wtf/Noncopyable.h"
#include "wtf/PtrUtil.h"
#include "wtf/text/WTFString.h"
-#include <memory>
-#include <v8-inspector.h>
namespace blink {
@@ -269,10 +270,12 @@ WebDevToolsAgentImpl::WebDevToolsAgentImpl(WebLocalFrameImpl* webLocalFrameImpl,
m_networkAgent(nullptr),
m_layerTreeAgent(nullptr),
m_tracingAgent(nullptr),
+ m_traceEventsAgent(new InspectorTraceEvents()),
m_includeViewAgents(includeViewAgents),
m_layerTreeId(0) {
DCHECK(isMainThread());
DCHECK(m_webLocalFrameImpl->frame());
+ m_instrumentingAgents->addInspectorTraceEvents(m_traceEventsAgent);
}
WebDevToolsAgentImpl::~WebDevToolsAgentImpl() {
@@ -291,12 +294,15 @@ DEFINE_TRACE(WebDevToolsAgentImpl) {
visitor->trace(m_networkAgent);
visitor->trace(m_layerTreeAgent);
visitor->trace(m_tracingAgent);
+ visitor->trace(m_traceEventsAgent);
visitor->trace(m_session);
}
void WebDevToolsAgentImpl::willBeDestroyed() {
DCHECK(m_webLocalFrameImpl->frame());
DCHECK(m_inspectedFrames->root()->view());
+ m_instrumentingAgents->removeInspectorTraceEvents(m_traceEventsAgent);
+ m_traceEventsAgent = nullptr;
detach();
m_resourceContentLoader->dispose();
m_client = nullptr;
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsAgentImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698