| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.TimelineModel} | 7 * @extends {WebInspector.TimelineModel} |
| 8 * @param {!WebInspector.TimelineManager} timelineManager | 8 * @param {!WebInspector.TimelineManager} timelineManager |
| 9 */ | 9 */ |
| 10 WebInspector.TimelineModelImpl = function(timelineManager) | 10 WebInspector.TimelineModelImpl = function(timelineManager) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 }, | 161 }, |
| 162 | 162 |
| 163 /** | 163 /** |
| 164 * @param {!TimelineAgent.TimelineEvent} payload | 164 * @param {!TimelineAgent.TimelineEvent} payload |
| 165 * @param {?WebInspector.TimelineModel.Record} parentRecord | 165 * @param {?WebInspector.TimelineModel.Record} parentRecord |
| 166 * @return {!WebInspector.TimelineModel.Record} | 166 * @return {!WebInspector.TimelineModel.Record} |
| 167 */ | 167 */ |
| 168 _innerAddRecord: function(payload, parentRecord) | 168 _innerAddRecord: function(payload, parentRecord) |
| 169 { | 169 { |
| 170 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa
rentRecord); | 170 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa
rentRecord); |
| 171 if (WebInspector.TimelineUIUtils.isEventDivider(record)) | 171 if (WebInspector.TimelineUIUtilsImpl.isEventDivider(record)) |
| 172 this._eventDividerRecords.push(record); | 172 this._eventDividerRecords.push(record); |
| 173 | 173 |
| 174 for (var i = 0; payload.children && i < payload.children.length; ++i) | 174 for (var i = 0; payload.children && i < payload.children.length; ++i) |
| 175 this._innerAddRecord.call(this, payload.children[i], record); | 175 this._innerAddRecord.call(this, payload.children[i], record); |
| 176 | 176 |
| 177 record._calculateAggregatedStats(); | 177 record._calculateAggregatedStats(); |
| 178 if (parentRecord) | 178 if (parentRecord) |
| 179 parentRecord._selfTime -= record.endTime() - record.startTime(); | 179 parentRecord._selfTime -= record.endTime() - record.startTime(); |
| 180 return record; | 180 return record; |
| 181 }, | 181 }, |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 750 break; | 750 break; |
| 751 length += itemLength; | 751 length += itemLength; |
| 752 data.push(item); | 752 data.push(item); |
| 753 ++this._recordIndex; | 753 ++this._recordIndex; |
| 754 } | 754 } |
| 755 if (this._recordIndex === this._payloads.length) | 755 if (this._recordIndex === this._payloads.length) |
| 756 data.push(data.pop() + "]"); | 756 data.push(data.pop() + "]"); |
| 757 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 757 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
| 758 } | 758 } |
| 759 } | 759 } |
| OLD | NEW |