| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (record.type() === WebInspector.TimelineModel.RecordType.GPUTask) | 155 if (record.type() === WebInspector.TimelineModel.RecordType.GPUTask) |
| 156 this._gpuThreadTasks.push(record); | 156 this._gpuThreadTasks.push(record); |
| 157 | 157 |
| 158 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordAd
ded, record); | 158 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordAd
ded, record); |
| 159 }, | 159 }, |
| 160 | 160 |
| 161 /** | 161 /** |
| 162 * @param {!TimelineAgent.TimelineEvent} payload | 162 * @param {!TimelineAgent.TimelineEvent} payload |
| 163 * @param {?WebInspector.TimelineModel.Record} parentRecord | 163 * @param {?WebInspector.TimelineModel.Record} parentRecord |
| 164 * @return {!WebInspector.TimelineModel.Record} | 164 * @return {!WebInspector.TimelineModel.Record} |
| 165 * @this {!WebInspector.TimelineModel} | |
| 166 */ | 165 */ |
| 167 _innerAddRecord: function(payload, parentRecord) | 166 _innerAddRecord: function(payload, parentRecord) |
| 168 { | 167 { |
| 169 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa
rentRecord); | 168 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa
rentRecord); |
| 170 if (WebInspector.TimelineUIUtils.isEventDivider(record)) | 169 if (WebInspector.TimelineUIUtils.isEventDivider(record)) |
| 171 this._eventDividerRecords.push(record); | 170 this._eventDividerRecords.push(record); |
| 172 | 171 |
| 173 for (var i = 0; payload.children && i < payload.children.length; ++i) | 172 for (var i = 0; payload.children && i < payload.children.length; ++i) |
| 174 this._innerAddRecord.call(this, payload.children[i], record); | 173 this._innerAddRecord.call(this, payload.children[i], record); |
| 175 | 174 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 this._requestAnimationFrameRecords = {}; | 282 this._requestAnimationFrameRecords = {}; |
| 284 this._layoutInvalidate = {}; | 283 this._layoutInvalidate = {}; |
| 285 this._lastScheduleStyleRecalculation = {}; | 284 this._lastScheduleStyleRecalculation = {}; |
| 286 this._webSocketCreateRecords = {}; | 285 this._webSocketCreateRecords = {}; |
| 287 } | 286 } |
| 288 } | 287 } |
| 289 | 288 |
| 290 /** | 289 /** |
| 291 * @constructor | 290 * @constructor |
| 292 * @implements {WebInspector.TimelineModel.Record} | 291 * @implements {WebInspector.TimelineModel.Record} |
| 293 * @param {!WebInspector.TimelineModel} model | 292 * @param {!WebInspector.TimelineModelImpl} model |
| 294 * @param {!TimelineAgent.TimelineEvent} timelineEvent | 293 * @param {!TimelineAgent.TimelineEvent} timelineEvent |
| 295 * @param {?WebInspector.TimelineModel.Record} parentRecord | 294 * @param {?WebInspector.TimelineModel.Record} parentRecord |
| 296 */ | 295 */ |
| 297 WebInspector.TimelineModel.RecordImpl = function(model, timelineEvent, parentRec
ord) | 296 WebInspector.TimelineModel.RecordImpl = function(model, timelineEvent, parentRec
ord) |
| 298 { | 297 { |
| 299 this._model = model; | 298 this._model = model; |
| 300 var bindings = this._model._bindings; | 299 var bindings = this._model._bindings; |
| 301 this._aggregatedStats = {}; | 300 this._aggregatedStats = {}; |
| 302 this._record = timelineEvent; | 301 this._record = timelineEvent; |
| 303 this._children = []; | 302 this._children = []; |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 break; | 768 break; |
| 770 length += itemLength; | 769 length += itemLength; |
| 771 data.push(item); | 770 data.push(item); |
| 772 ++this._recordIndex; | 771 ++this._recordIndex; |
| 773 } | 772 } |
| 774 if (this._recordIndex === this._payloads.length) | 773 if (this._recordIndex === this._payloads.length) |
| 775 data.push(data.pop() + "]"); | 774 data.push(data.pop() + "]"); |
| 776 stream.write(data.join(separator), this._writeNextChunk.bind(this)); | 775 stream.write(data.join(separator), this._writeNextChunk.bind(this)); |
| 777 } | 776 } |
| 778 } | 777 } |
| OLD | NEW |