Index: Source/core/inspector/InspectorTimelineAgent.cpp |
diff --git a/Source/core/inspector/InspectorTimelineAgent.cpp b/Source/core/inspector/InspectorTimelineAgent.cpp |
index 86e60212682e654065bbb255b61c6a363c57a2c2..fbe0ee6b16d97e455e84b6530e3ba33591d9824b 100644 |
--- a/Source/core/inspector/InspectorTimelineAgent.cpp |
+++ b/Source/core/inspector/InspectorTimelineAgent.cpp |
@@ -261,6 +261,13 @@ InspectorTimelineAgent::~InspectorTimelineAgent() |
{ |
} |
+void InspectorTimelineAgent::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_pageAgent); |
+ visitor->trace(m_layerTreeAgent); |
+ InspectorBaseAgent::trace(visitor); |
+} |
+ |
void InspectorTimelineAgent::setFrontend(InspectorFrontend* frontend) |
{ |
m_frontend = frontend->timeline(); |
@@ -351,23 +358,23 @@ void InspectorTimelineAgent::innerStart() |
ScriptGCEvent::addEventListener(this); |
if (m_client) { |
TraceEventDispatcher* dispatcher = TraceEventDispatcher::instance(); |
- dispatcher->addListener(InstrumentationEvents::BeginFrame, TRACE_EVENT_PHASE_INSTANT, this, &InspectorTimelineAgent::onBeginImplSideFrame, m_client); |
- dispatcher->addListener(InstrumentationEvents::PaintSetup, TRACE_EVENT_PHASE_BEGIN, this, &InspectorTimelineAgent::onPaintSetupBegin, m_client); |
- dispatcher->addListener(InstrumentationEvents::PaintSetup, TRACE_EVENT_PHASE_END, this, &InspectorTimelineAgent::onPaintSetupEnd, m_client); |
- dispatcher->addListener(InstrumentationEvents::RasterTask, TRACE_EVENT_PHASE_BEGIN, this, &InspectorTimelineAgent::onRasterTaskBegin, m_client); |
- dispatcher->addListener(InstrumentationEvents::RasterTask, TRACE_EVENT_PHASE_END, this, &InspectorTimelineAgent::onRasterTaskEnd, m_client); |
- dispatcher->addListener(InstrumentationEvents::Layer, TRACE_EVENT_PHASE_DELETE_OBJECT, this, &InspectorTimelineAgent::onLayerDeleted, m_client); |
- dispatcher->addListener(InstrumentationEvents::RequestMainThreadFrame, TRACE_EVENT_PHASE_INSTANT, this, &InspectorTimelineAgent::onRequestMainThreadFrame, m_client); |
- dispatcher->addListener(InstrumentationEvents::ActivateLayerTree, TRACE_EVENT_PHASE_INSTANT, this, &InspectorTimelineAgent::onActivateLayerTree, m_client); |
- dispatcher->addListener(InstrumentationEvents::DrawFrame, TRACE_EVENT_PHASE_INSTANT, this, &InspectorTimelineAgent::onDrawFrame, m_client); |
- dispatcher->addListener(PlatformInstrumentation::ImageDecodeEvent, TRACE_EVENT_PHASE_BEGIN, this, &InspectorTimelineAgent::onImageDecodeBegin, m_client); |
- dispatcher->addListener(PlatformInstrumentation::ImageDecodeEvent, TRACE_EVENT_PHASE_END, this, &InspectorTimelineAgent::onImageDecodeEnd, m_client); |
- dispatcher->addListener(PlatformInstrumentation::DrawLazyPixelRefEvent, TRACE_EVENT_PHASE_INSTANT, this, &InspectorTimelineAgent::onDrawLazyPixelRef, m_client); |
- dispatcher->addListener(PlatformInstrumentation::DecodeLazyPixelRefEvent, TRACE_EVENT_PHASE_BEGIN, this, &InspectorTimelineAgent::onDecodeLazyPixelRefBegin, m_client); |
- dispatcher->addListener(PlatformInstrumentation::DecodeLazyPixelRefEvent, TRACE_EVENT_PHASE_END, this, &InspectorTimelineAgent::onDecodeLazyPixelRefEnd, m_client); |
- dispatcher->addListener(PlatformInstrumentation::LazyPixelRef, TRACE_EVENT_PHASE_DELETE_OBJECT, this, &InspectorTimelineAgent::onLazyPixelRefDeleted, m_client); |
- dispatcher->addListener(InstrumentationEvents::EmbedderCallback, TRACE_EVENT_PHASE_BEGIN, this, &InspectorTimelineAgent::onEmbedderCallbackBegin, m_client); |
- dispatcher->addListener(InstrumentationEvents::EmbedderCallback, TRACE_EVENT_PHASE_END, this, &InspectorTimelineAgent::onEmbedderCallbackEnd, m_client); |
+ dispatcher->addListener(InstrumentationEvents::BeginFrame, TRACE_EVENT_PHASE_INSTANT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onBeginImplSideFrame)), m_client); |
haraken
2014/07/14 12:33:39
Shall we add a create() method?
keishi
2014/07/15 05:52:52
Done.
|
+ dispatcher->addListener(InstrumentationEvents::PaintSetup, TRACE_EVENT_PHASE_BEGIN, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onPaintSetupBegin)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::PaintSetup, TRACE_EVENT_PHASE_END, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onPaintSetupEnd)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::RasterTask, TRACE_EVENT_PHASE_BEGIN, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onRasterTaskBegin)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::RasterTask, TRACE_EVENT_PHASE_END, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onRasterTaskEnd)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::Layer, TRACE_EVENT_PHASE_DELETE_OBJECT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onLayerDeleted)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::RequestMainThreadFrame, TRACE_EVENT_PHASE_INSTANT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onRequestMainThreadFrame)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::ActivateLayerTree, TRACE_EVENT_PHASE_INSTANT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onActivateLayerTree)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::DrawFrame, TRACE_EVENT_PHASE_INSTANT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onDrawFrame)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::ImageDecodeEvent, TRACE_EVENT_PHASE_BEGIN, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onImageDecodeBegin)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::ImageDecodeEvent, TRACE_EVENT_PHASE_END, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onImageDecodeEnd)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::DrawLazyPixelRefEvent, TRACE_EVENT_PHASE_INSTANT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onDrawLazyPixelRef)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::DecodeLazyPixelRefEvent, TRACE_EVENT_PHASE_BEGIN, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onDecodeLazyPixelRefBegin)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::DecodeLazyPixelRefEvent, TRACE_EVENT_PHASE_END, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onDecodeLazyPixelRefEnd)), m_client); |
+ dispatcher->addListener(PlatformInstrumentation::LazyPixelRef, TRACE_EVENT_PHASE_DELETE_OBJECT, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onLazyPixelRefDeleted)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::EmbedderCallback, TRACE_EVENT_PHASE_BEGIN, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onEmbedderCallbackBegin)), m_client); |
+ dispatcher->addListener(InstrumentationEvents::EmbedderCallback, TRACE_EVENT_PHASE_END, adoptPtrWillBeNoop(new InspectorTimelineAgent::TraceEventListener(this, &InspectorTimelineAgent::onEmbedderCallbackEnd)), m_client); |
if (m_state->getBoolean(TimelineAgentState::includeGPUEvents)) { |
m_pendingGPURecord.clear(); |