Chromium Code Reviews| 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._networkView.enableRuler(true); | |
|
pfeldman
2017/01/04 22:54:08
This is always enabled, no?
alph
2017/01/04 23:14:43
Indeed. Thanks.
| |
| 202 this._mainView.enableRuler(false); | |
| 203 this._splitWidget.showBoth(); | |
| 204 this.resizeToPreferredHeights(); | |
| 205 } | |
| 197 this._networkView.scheduleUpdate(); | 206 this._networkView.scheduleUpdate(); |
| 198 } | 207 } |
| 199 | 208 |
| 200 /** | 209 /** |
| 201 * @override | 210 * @override |
| 202 */ | 211 */ |
| 203 extensionDataAdded() { | 212 extensionDataAdded() { |
| 204 while (this._nextExtensionIndex < this._extensionModels.length) | 213 while (this._nextExtensionIndex < this._extensionModels.length) |
| 205 this._dataProvider.appendExtensionEvents(this._extensionModels[this._nextE xtensionIndex++]); | 214 this._dataProvider.appendExtensionEvents(this._extensionModels[this._nextE xtensionIndex++]); |
| 206 this._mainView.scheduleUpdate(); | 215 this._mainView.scheduleUpdate(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 288 /** | 297 /** |
| 289 * @param {!UI.FlameChartDataProvider} dataProvider | 298 * @param {!UI.FlameChartDataProvider} dataProvider |
| 290 * @param {!Common.Event} event | 299 * @param {!Common.Event} event |
| 291 */ | 300 */ |
| 292 _onEntrySelected(dataProvider, event) { | 301 _onEntrySelected(dataProvider, event) { |
| 293 var entryIndex = /** @type{number} */ (event.data); | 302 var entryIndex = /** @type{number} */ (event.data); |
| 294 this._delegate.select(dataProvider.createSelection(entryIndex)); | 303 this._delegate.select(dataProvider.createSelection(entryIndex)); |
| 295 } | 304 } |
| 296 | 305 |
| 297 resizeToPreferredHeights() { | 306 resizeToPreferredHeights() { |
| 298 this._splitWidget.setSidebarSize(this._networkDataProvider.preferredHeight() + this._splitResizer.clientHeight); | 307 this._splitWidget.setSidebarSize( |
| 308 this._networkDataProvider.preferredHeight() + this._splitResizer.clientH eight + UI.FlameChart.HeaderHeight + 2); | |
| 299 } | 309 } |
| 300 }; | 310 }; |
| 301 | 311 |
| 302 /** | 312 /** |
| 303 * @unrestricted | 313 * @unrestricted |
| 304 */ | 314 */ |
| 305 Timeline.TimelineFlameChartView.Selection = class { | 315 Timeline.TimelineFlameChartView.Selection = class { |
| 306 /** | 316 /** |
| 307 * @param {!Timeline.TimelineSelection} selection | 317 * @param {!Timeline.TimelineSelection} selection |
| 308 * @param {number} entryIndex | 318 * @param {number} entryIndex |
| 309 */ | 319 */ |
| 310 constructor(selection, entryIndex) { | 320 constructor(selection, entryIndex) { |
| 311 this.timelineSelection = selection; | 321 this.timelineSelection = selection; |
| 312 this.entryIndex = entryIndex; | 322 this.entryIndex = entryIndex; |
| 313 } | 323 } |
| 314 }; | 324 }; |
| OLD | NEW |