| 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 * @implements {UI.FlameChartDataProvider} | 6 * @implements {UI.FlameChartDataProvider} |
| 7 * @unrestricted | 7 * @unrestricted |
| 8 */ | 8 */ |
| 9 Timeline.TimelineFlameChartDataProviderBase = class { | 9 Timeline.TimelineFlameChartDataProviderBase = class { |
| 10 constructor() { | 10 constructor() { |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 super(); | 291 super(); |
| 292 this.element.classList.add('timeline-flamechart'); | 292 this.element.classList.add('timeline-flamechart'); |
| 293 this._delegate = delegate; | 293 this._delegate = delegate; |
| 294 this._model = timelineModel; | 294 this._model = timelineModel; |
| 295 this._extensionModels = extensionModels; | 295 this._extensionModels = extensionModels; |
| 296 this._splitWidget = new UI.SplitWidget(false, false, 'timelineFlamechartMain
View', 150); | 296 this._splitWidget = new UI.SplitWidget(false, false, 'timelineFlamechartMain
View', 150); |
| 297 | 297 |
| 298 this._dataProvider = new Timeline.TimelineFlameChartDataProvider(this._model
, frameModel, irModel, filters); | 298 this._dataProvider = new Timeline.TimelineFlameChartDataProvider(this._model
, frameModel, irModel, filters); |
| 299 var mainViewGroupExpansionSetting = Common.settings.createSetting('timelineF
lamechartMainViewGroupExpansion', {}); | 299 var mainViewGroupExpansionSetting = Common.settings.createSetting('timelineF
lamechartMainViewGroupExpansion', {}); |
| 300 this._mainView = new UI.FlameChart(this._dataProvider, this, mainViewGroupEx
pansionSetting); | 300 this._mainView = new UI.FlameChart(this._dataProvider, this, mainViewGroupEx
pansionSetting); |
| 301 this._mainView.alwaysShowVerticalScroll(); |
| 301 | 302 |
| 302 var networkViewGroupExpansionSetting = | 303 var networkViewGroupExpansionSetting = |
| 303 Common.settings.createSetting('timelineFlamechartNetworkViewGroupExpansi
on', {}); | 304 Common.settings.createSetting('timelineFlamechartNetworkViewGroupExpansi
on', {}); |
| 304 this._networkDataProvider = new Timeline.TimelineFlameChartNetworkDataProvid
er(this._model); | 305 this._networkDataProvider = new Timeline.TimelineFlameChartNetworkDataProvid
er(this._model); |
| 305 this._networkView = new UI.FlameChart(this._networkDataProvider, this, netwo
rkViewGroupExpansionSetting); | 306 this._networkView = new UI.FlameChart(this._networkDataProvider, this, netwo
rkViewGroupExpansionSetting); |
| 307 this._networkView.alwaysShowVerticalScroll(); |
| 306 networkViewGroupExpansionSetting.addChangeListener(this.resizeToPreferredHei
ghts.bind(this)); | 308 networkViewGroupExpansionSetting.addChangeListener(this.resizeToPreferredHei
ghts.bind(this)); |
| 307 | 309 |
| 308 this._splitWidget.setMainWidget(this._mainView); | 310 this._splitWidget.setMainWidget(this._mainView); |
| 309 this._splitWidget.setSidebarWidget(this._networkView); | 311 this._splitWidget.setSidebarWidget(this._networkView); |
| 310 this._splitWidget.show(this.element); | 312 this._splitWidget.show(this.element); |
| 311 | 313 |
| 312 this._onMainEntrySelected = this._onEntrySelected.bind(this, this._dataProvi
der); | 314 this._onMainEntrySelected = this._onEntrySelected.bind(this, this._dataProvi
der); |
| 313 this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networ
kDataProvider); | 315 this._onNetworkEntrySelected = this._onEntrySelected.bind(this, this._networ
kDataProvider); |
| 314 this._mainView.addEventListener(UI.FlameChart.Events.EntrySelected, this._on
MainEntrySelected, this); | 316 this._mainView.addEventListener(UI.FlameChart.Events.EntrySelected, this._on
MainEntrySelected, this); |
| 315 this._networkView.addEventListener(UI.FlameChart.Events.EntrySelected, this.
_onNetworkEntrySelected, this); | 317 this._networkView.addEventListener(UI.FlameChart.Events.EntrySelected, this.
_onNetworkEntrySelected, this); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 Timeline.TimelineFlameChartView.Selection = class { | 476 Timeline.TimelineFlameChartView.Selection = class { |
| 475 /** | 477 /** |
| 476 * @param {!Timeline.TimelineSelection} selection | 478 * @param {!Timeline.TimelineSelection} selection |
| 477 * @param {number} entryIndex | 479 * @param {number} entryIndex |
| 478 */ | 480 */ |
| 479 constructor(selection, entryIndex) { | 481 constructor(selection, entryIndex) { |
| 480 this.timelineSelection = selection; | 482 this.timelineSelection = selection; |
| 481 this.entryIndex = entryIndex; | 483 this.entryIndex = entryIndex; |
| 482 } | 484 } |
| 483 }; | 485 }; |
| OLD | NEW |