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 {Timeline.TimelineModeView} | 6 * @implements {Timeline.TimelineModeView} |
7 * @implements {PerfUI.FlameChartDelegate} | 7 * @implements {PerfUI.FlameChartDelegate} |
8 * @implements {UI.Searchable} | 8 * @implements {UI.Searchable} |
9 * @unrestricted | 9 * @unrestricted |
10 */ | 10 */ |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 if (selection && this._detailsView) | 240 if (selection && this._detailsView) |
241 this._detailsView.setSelection(selection); | 241 this._detailsView.setSelection(selection); |
242 } | 242 } |
243 | 243 |
244 /** | 244 /** |
245 * @param {!PerfUI.FlameChartDataProvider} dataProvider | 245 * @param {!PerfUI.FlameChartDataProvider} dataProvider |
246 * @param {!Common.Event} event | 246 * @param {!Common.Event} event |
247 */ | 247 */ |
248 _onEntrySelected(dataProvider, event) { | 248 _onEntrySelected(dataProvider, event) { |
249 var entryIndex = /** @type{number} */ (event.data); | 249 var entryIndex = /** @type{number} */ (event.data); |
| 250 if (Runtime.experiments.isEnabled('timelineEventInitiators') && dataProvider
=== this._mainDataProvider) { |
| 251 if (this._mainDataProvider.buildFlowForInitiator(entryIndex)) |
| 252 this._mainFlameChart.scheduleUpdate(); |
| 253 } |
250 this._delegate.select(dataProvider.createSelection(entryIndex)); | 254 this._delegate.select(dataProvider.createSelection(entryIndex)); |
251 } | 255 } |
252 | 256 |
253 resizeToPreferredHeights() { | 257 resizeToPreferredHeights() { |
254 if (!this.isShowing()) { | 258 if (!this.isShowing()) { |
255 this._needsResizeToPreferredHeights = true; | 259 this._needsResizeToPreferredHeights = true; |
256 return; | 260 return; |
257 } | 261 } |
258 this._needsResizeToPreferredHeights = false; | 262 this._needsResizeToPreferredHeights = false; |
259 this._networkPane.element.classList.toggle( | 263 this._networkPane.element.classList.toggle( |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 context.translate(this._style.lineWidth < 1 || (this._style.lineWidth & 1)
? 0.5 : 0, 0.5); | 504 context.translate(this._style.lineWidth < 1 || (this._style.lineWidth & 1)
? 0.5 : 0, 0.5); |
501 context.beginPath(); | 505 context.beginPath(); |
502 context.moveTo(x, height); | 506 context.moveTo(x, height); |
503 context.setLineDash(this._style.dashStyle); | 507 context.setLineDash(this._style.dashStyle); |
504 context.lineTo(x, context.canvas.height); | 508 context.lineTo(x, context.canvas.height); |
505 context.stroke(); | 509 context.stroke(); |
506 } | 510 } |
507 context.restore(); | 511 context.restore(); |
508 } | 512 } |
509 }; | 513 }; |
OLD | NEW |