OLD | NEW |
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 InspectorTimelineAgentTraceEventListener(InspectorTimelineAgent* instance, T
raceEventHandlerMethod method) | 167 InspectorTimelineAgentTraceEventListener(InspectorTimelineAgent* instance, T
raceEventHandlerMethod method) |
168 : m_instance(instance) | 168 : m_instance(instance) |
169 , m_method(method) | 169 , m_method(method) |
170 { | 170 { |
171 } | 171 } |
172 RawPtrWillBeMember<InspectorTimelineAgent> m_instance; | 172 RawPtrWillBeMember<InspectorTimelineAgent> m_instance; |
173 TraceEventHandlerMethod m_method; | 173 TraceEventHandlerMethod m_method; |
174 }; | 174 }; |
175 | 175 |
176 struct TimelineRecordEntry { | 176 struct TimelineRecordEntry { |
177 TimelineRecordEntry(PassRefPtr<TimelineEvent> record, PassRefPtr<JSONObject>
data, PassRefPtr<TypeBuilder::Array<TimelineEvent> > children, const String& ty
pe) | 177 TimelineRecordEntry(PassRefPtr<TimelineEvent> record, PassRefPtr<JSONObject>
data, PassRefPtr<TypeBuilder::Array<TimelineEvent>> children, const String& typ
e) |
178 : record(record) | 178 : record(record) |
179 , data(data) | 179 , data(data) |
180 , children(children) | 180 , children(children) |
181 , type(type) | 181 , type(type) |
182 , skipWhenUnbalanced(false) | 182 , skipWhenUnbalanced(false) |
183 { | 183 { |
184 } | 184 } |
185 RefPtr<TimelineEvent> record; | 185 RefPtr<TimelineEvent> record; |
186 RefPtr<JSONObject> data; | 186 RefPtr<JSONObject> data; |
187 RefPtr<TypeBuilder::Array<TimelineEvent> > children; | 187 RefPtr<TypeBuilder::Array<TimelineEvent>> children; |
188 String type; | 188 String type; |
189 bool skipWhenUnbalanced; | 189 bool skipWhenUnbalanced; |
190 }; | 190 }; |
191 | 191 |
192 class TimelineRecordStack { | 192 class TimelineRecordStack { |
193 DISALLOW_ALLOCATION(); | 193 DISALLOW_ALLOCATION(); |
194 private: | 194 private: |
195 struct Entry { | 195 struct Entry { |
196 Entry(PassRefPtr<TimelineEvent> record, const String& type) | 196 Entry(PassRefPtr<TimelineEvent> record, const String& type) |
197 : record(record) | 197 : record(record) |
198 , children(TypeBuilder::Array<TimelineEvent>::create()) | 198 , children(TypeBuilder::Array<TimelineEvent>::create()) |
199 #if ENABLE(ASSERT) | 199 #if ENABLE(ASSERT) |
200 , type(type) | 200 , type(type) |
201 #endif | 201 #endif |
202 { | 202 { |
203 } | 203 } |
204 | 204 |
205 RefPtr<TimelineEvent> record; | 205 RefPtr<TimelineEvent> record; |
206 RefPtr<TypeBuilder::Array<TimelineEvent> > children; | 206 RefPtr<TypeBuilder::Array<TimelineEvent>> children; |
207 #if ENABLE(ASSERT) | 207 #if ENABLE(ASSERT) |
208 String type; | 208 String type; |
209 #endif | 209 #endif |
210 }; | 210 }; |
211 | 211 |
212 public: | 212 public: |
213 TimelineRecordStack() : m_timelineAgent(nullptr) { } | 213 TimelineRecordStack() : m_timelineAgent(nullptr) { } |
214 explicit TimelineRecordStack(InspectorTimelineAgent*); | 214 explicit TimelineRecordStack(InspectorTimelineAgent*); |
215 | 215 |
216 void addScopedRecord(PassRefPtr<TimelineEvent> record, const String& type); | 216 void addScopedRecord(PassRefPtr<TimelineEvent> record, const String& type); |
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 { | 1349 { |
1350 visitor->trace(m_timelineAgent); | 1350 visitor->trace(m_timelineAgent); |
1351 } | 1351 } |
1352 | 1352 |
1353 void TimelineThreadState::trace(Visitor* visitor) | 1353 void TimelineThreadState::trace(Visitor* visitor) |
1354 { | 1354 { |
1355 visitor->trace(recordStack); | 1355 visitor->trace(recordStack); |
1356 } | 1356 } |
1357 | 1357 |
1358 } // namespace blink | 1358 } // namespace blink |
OLD | NEW |