| 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 {PerfUI.FlameChartDataProvider} | 6 * @implements {PerfUI.FlameChartDataProvider} |
| 7 * @unrestricted | 7 * @unrestricted |
| 8 */ | 8 */ |
| 9 Timeline.TimelineFlameChartNetworkDataProvider = class { | 9 Timeline.TimelineFlameChartNetworkDataProvider = class { |
| 10 constructor() { | 10 constructor() { |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 var div = contents.createChild('span'); | 288 var div = contents.createChild('span'); |
| 289 div.textContent = | 289 div.textContent = |
| 290 NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.Reso
urcePriority} */ (request.priority)); | 290 NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.Reso
urcePriority} */ (request.priority)); |
| 291 div.style.color = this._colorForPriority(request.priority) || 'black'; | 291 div.style.color = this._colorForPriority(request.priority) || 'black'; |
| 292 } | 292 } |
| 293 contents.createChild('span').textContent = request.url.trimMiddle(maxURLChar
s); | 293 contents.createChild('span').textContent = request.url.trimMiddle(maxURLChar
s); |
| 294 return element; | 294 return element; |
| 295 } | 295 } |
| 296 | 296 |
| 297 /** | 297 /** |
| 298 * @override | |
| 299 * @param {number} entryIndex | |
| 300 */ | |
| 301 highlightEntry(entryIndex) { | |
| 302 } | |
| 303 | |
| 304 /** | |
| 305 * @param {string} priority | 298 * @param {string} priority |
| 306 * @return {?string} | 299 * @return {?string} |
| 307 */ | 300 */ |
| 308 _colorForPriority(priority) { | 301 _colorForPriority(priority) { |
| 309 if (!this._priorityToValue) { | 302 if (!this._priorityToValue) { |
| 310 var priorities = Protocol.Network.ResourcePriority; | 303 var priorities = Protocol.Network.ResourcePriority; |
| 311 this._priorityToValue = new Map([ | 304 this._priorityToValue = new Map([ |
| 312 [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [p
riorities.High, 4], | 305 [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [p
riorities.High, 4], |
| 313 [priorities.VeryHigh, 5] | 306 [priorities.VeryHigh, 5] |
| 314 ]); | 307 ]); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 386 |
| 394 /** | 387 /** |
| 395 * @override | 388 * @override |
| 396 * @param {number} entryIndex | 389 * @param {number} entryIndex |
| 397 * @return {boolean} | 390 * @return {boolean} |
| 398 */ | 391 */ |
| 399 canJumpToEntry(entryIndex) { | 392 canJumpToEntry(entryIndex) { |
| 400 return false; | 393 return false; |
| 401 } | 394 } |
| 402 }; | 395 }; |
| OLD | NEW |