OLD | NEW |
1 // | 1 // |
2 // Copyright 2014 The Chromium Authors. All rights reserved. | 2 // Copyright 2014 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 // | 5 // |
6 | 6 |
7 #include "core/inspector/InspectorTracingAgent.h" | 7 #include "core/inspector/InspectorTracingAgent.h" |
8 | 8 |
9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
10 #include "core/inspector/IdentifiersFactory.h" | 10 #include "core/inspector/IdentifiersFactory.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 callback->sendSuccess(); | 84 callback->sendSuccess(); |
85 } | 85 } |
86 | 86 |
87 bool InspectorTracingAgent::isStarted() const | 87 bool InspectorTracingAgent::isStarted() const |
88 { | 88 { |
89 return !sessionId().isEmpty(); | 89 return !sessionId().isEmpty(); |
90 } | 90 } |
91 | 91 |
92 String InspectorTracingAgent::sessionId() const | 92 String InspectorTracingAgent::sessionId() const |
93 { | 93 { |
94 String16 result; | 94 String result; |
95 if (m_state) | 95 if (m_state) |
96 m_state->getString(TracingAgentState::sessionId, &result); | 96 m_state->getString(TracingAgentState::sessionId, &result); |
97 return result; | 97 return result; |
98 } | 98 } |
99 | 99 |
100 void InspectorTracingAgent::emitMetadataEvents() | 100 void InspectorTracingAgent::emitMetadataEvents() |
101 { | 101 { |
102 TRACE_EVENT_INSTANT1(devtoolsMetadataEventCategory, "TracingStartedInPage",
TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingStartedInFrame::data(sessionId
(), m_inspectedFrames->root())); | 102 TRACE_EVENT_INSTANT1(devtoolsMetadataEventCategory, "TracingStartedInPage",
TRACE_EVENT_SCOPE_THREAD, "data", InspectorTracingStartedInFrame::data(sessionId
(), m_inspectedFrames->root())); |
103 if (m_layerTreeId) | 103 if (m_layerTreeId) |
104 setLayerTreeId(m_layerTreeId); | 104 setLayerTreeId(m_layerTreeId); |
(...skipping 19 matching lines...) Expand all Loading... |
124 | 124 |
125 void InspectorTracingAgent::innerDisable() | 125 void InspectorTracingAgent::innerDisable() |
126 { | 126 { |
127 m_client->hideReloadingBlanket(); | 127 m_client->hideReloadingBlanket(); |
128 m_instrumentingAgents->removeInspectorTracingAgent(this); | 128 m_instrumentingAgents->removeInspectorTracingAgent(this); |
129 m_state->remove(TracingAgentState::sessionId); | 129 m_state->remove(TracingAgentState::sessionId); |
130 m_workerAgent->setTracingSessionId(String()); | 130 m_workerAgent->setTracingSessionId(String()); |
131 } | 131 } |
132 | 132 |
133 } // namespace blink | 133 } // namespace blink |
OLD | NEW |