| 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 Timeline.FlameChartStyle = { | 5 Timeline.FlameChartStyle = { |
| 6 textColor: '#333' | 6 textColor: '#333' |
| 7 }; | 7 }; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * @enum {symbol} | 10 * @enum {symbol} |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 /** | 187 /** |
| 188 * @override | 188 * @override |
| 189 */ | 189 */ |
| 190 refreshRecords() { | 190 refreshRecords() { |
| 191 this._dataProvider.reset(); | 191 this._dataProvider.reset(); |
| 192 this._nextExtensionIndex = 0; | 192 this._nextExtensionIndex = 0; |
| 193 this.extensionDataAdded(); | 193 this.extensionDataAdded(); |
| 194 this._mainView.scheduleUpdate(); | 194 this._mainView.scheduleUpdate(); |
| 195 | 195 |
| 196 this._networkDataProvider.reset(); | 196 this._networkDataProvider.reset(); |
| 197 if (this._networkDataProvider.isEmpty()) { |
| 198 this._mainView.enableRuler(true); |
| 199 this._splitWidget.hideSidebar(); |
| 200 } else { |
| 201 this._mainView.enableRuler(false); |
| 202 this._splitWidget.showBoth(); |
| 203 this.resizeToPreferredHeights(); |
| 204 } |
| 197 this._networkView.scheduleUpdate(); | 205 this._networkView.scheduleUpdate(); |
| 198 } | 206 } |
| 199 | 207 |
| 200 /** | 208 /** |
| 201 * @override | 209 * @override |
| 202 */ | 210 */ |
| 203 extensionDataAdded() { | 211 extensionDataAdded() { |
| 204 while (this._nextExtensionIndex < this._extensionModels.length) | 212 while (this._nextExtensionIndex < this._extensionModels.length) |
| 205 this._dataProvider.appendExtensionEvents(this._extensionModels[this._nextE
xtensionIndex++]); | 213 this._dataProvider.appendExtensionEvents(this._extensionModels[this._nextE
xtensionIndex++]); |
| 206 this._mainView.scheduleUpdate(); | 214 this._mainView.scheduleUpdate(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 /** | 296 /** |
| 289 * @param {!UI.FlameChartDataProvider} dataProvider | 297 * @param {!UI.FlameChartDataProvider} dataProvider |
| 290 * @param {!Common.Event} event | 298 * @param {!Common.Event} event |
| 291 */ | 299 */ |
| 292 _onEntrySelected(dataProvider, event) { | 300 _onEntrySelected(dataProvider, event) { |
| 293 var entryIndex = /** @type{number} */ (event.data); | 301 var entryIndex = /** @type{number} */ (event.data); |
| 294 this._delegate.select(dataProvider.createSelection(entryIndex)); | 302 this._delegate.select(dataProvider.createSelection(entryIndex)); |
| 295 } | 303 } |
| 296 | 304 |
| 297 resizeToPreferredHeights() { | 305 resizeToPreferredHeights() { |
| 298 this._splitWidget.setSidebarSize(this._networkDataProvider.preferredHeight()
+ this._splitResizer.clientHeight); | 306 this._splitWidget.setSidebarSize( |
| 307 this._networkDataProvider.preferredHeight() + this._splitResizer.clientH
eight + UI.FlameChart.HeaderHeight + 2); |
| 299 } | 308 } |
| 300 }; | 309 }; |
| 301 | 310 |
| 302 /** | 311 /** |
| 303 * @unrestricted | 312 * @unrestricted |
| 304 */ | 313 */ |
| 305 Timeline.TimelineFlameChartView.Selection = class { | 314 Timeline.TimelineFlameChartView.Selection = class { |
| 306 /** | 315 /** |
| 307 * @param {!Timeline.TimelineSelection} selection | 316 * @param {!Timeline.TimelineSelection} selection |
| 308 * @param {number} entryIndex | 317 * @param {number} entryIndex |
| 309 */ | 318 */ |
| 310 constructor(selection, entryIndex) { | 319 constructor(selection, entryIndex) { |
| 311 this.timelineSelection = selection; | 320 this.timelineSelection = selection; |
| 312 this.entryIndex = entryIndex; | 321 this.entryIndex = entryIndex; |
| 313 } | 322 } |
| 314 }; | 323 }; |
| OLD | NEW |