| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Timeline.TimelineFlameChartNetworkDataProvider = class extends Timeline.Timeline
FlameChartDataProviderBase { | 8 Timeline.TimelineFlameChartNetworkDataProvider = class extends Timeline.Timeline
FlameChartDataProviderBase { |
| 9 /** | 9 /** |
| 10 * @param {!TimelineModel.TimelineModel} model | 10 * @param {!TimelineModel.TimelineModel} model |
| 11 */ | 11 */ |
| 12 constructor(model) { | 12 constructor(model) { |
| 13 super(model, []); | 13 super(); |
| 14 this._model = model; |
| 15 /** @type {?UI.FlameChart.TimelineData} */ |
| 16 this._timelineData = null; |
| 14 var loadingCategory = Timeline.TimelineUIUtils.categories()['loading']; | 17 var loadingCategory = Timeline.TimelineUIUtils.categories()['loading']; |
| 15 this._waitingColor = loadingCategory.childColor; | 18 this._waitingColor = loadingCategory.childColor; |
| 16 this._processingColor = loadingCategory.color; | 19 this._processingColor = loadingCategory.color; |
| 17 | 20 |
| 18 this._style = { | 21 this._style = { |
| 19 padding: 4, | 22 padding: 4, |
| 20 height: 17, | 23 height: 17, |
| 21 collapsible: true, | 24 collapsible: true, |
| 22 color: UI.themeSupport.patchColor('#222', UI.ThemeSupport.ColorUsage.Foreg
round), | 25 color: UI.themeSupport.patchColor('#222', UI.ThemeSupport.ColorUsage.Foreg
round), |
| 23 font: this._font, | 26 font: this._font, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 41 this._timelineData = new UI.FlameChart.TimelineData([], [], [], []); | 44 this._timelineData = new UI.FlameChart.TimelineData([], [], [], []); |
| 42 this._appendTimelineData(this._model.mainThreadEvents()); | 45 this._appendTimelineData(this._model.mainThreadEvents()); |
| 43 return this._timelineData; | 46 return this._timelineData; |
| 44 } | 47 } |
| 45 | 48 |
| 46 /** | 49 /** |
| 47 * @override | 50 * @override |
| 48 */ | 51 */ |
| 49 reset() { | 52 reset() { |
| 50 super.reset(); | 53 super.reset(); |
| 54 this._timelineData = null; |
| 51 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ | 55 /** @type {!Array<!TimelineModel.TimelineModel.NetworkRequest>} */ |
| 52 this._requests = []; | 56 this._requests = []; |
| 53 } | 57 } |
| 54 | 58 |
| 55 /** | 59 /** |
| 56 * @param {number} startTime | 60 * @param {number} startTime |
| 57 * @param {number} endTime | 61 * @param {number} endTime |
| 58 */ | 62 */ |
| 59 setWindowTimes(startTime, endTime) { | 63 setWindowTimes(startTime, endTime) { |
| 60 this._startTime = startTime; | 64 this._startTime = startTime; |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 this._timelineData.entryLevels.push(this._requests.length - 1); | 316 this._timelineData.entryLevels.push(this._requests.length - 1); |
| 313 } | 317 } |
| 314 | 318 |
| 315 /** | 319 /** |
| 316 * @return {number} | 320 * @return {number} |
| 317 */ | 321 */ |
| 318 preferredHeight() { | 322 preferredHeight() { |
| 319 return this._style.height * (this._group.expanded ? Number.constrain(this._c
urrentLevel + 1, 4, 8) : 2) + 2; | 323 return this._style.height * (this._group.expanded ? Number.constrain(this._c
urrentLevel + 1, 4, 8) : 2) + 2; |
| 320 } | 324 } |
| 321 }; | 325 }; |
| OLD | NEW |