| 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 /** |
| 298 * @param {string} priority | 305 * @param {string} priority |
| 299 * @return {?string} | 306 * @return {?string} |
| 300 */ | 307 */ |
| 301 _colorForPriority(priority) { | 308 _colorForPriority(priority) { |
| 302 if (!this._priorityToValue) { | 309 if (!this._priorityToValue) { |
| 303 var priorities = Protocol.Network.ResourcePriority; | 310 var priorities = Protocol.Network.ResourcePriority; |
| 304 this._priorityToValue = new Map([ | 311 this._priorityToValue = new Map([ |
| 305 [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [p
riorities.High, 4], | 312 [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [p
riorities.High, 4], |
| 306 [priorities.VeryHigh, 5] | 313 [priorities.VeryHigh, 5] |
| 307 ]); | 314 ]); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 393 |
| 387 /** | 394 /** |
| 388 * @override | 395 * @override |
| 389 * @param {number} entryIndex | 396 * @param {number} entryIndex |
| 390 * @return {boolean} | 397 * @return {boolean} |
| 391 */ | 398 */ |
| 392 canJumpToEntry(entryIndex) { | 399 canJumpToEntry(entryIndex) { |
| 393 return false; | 400 return false; |
| 394 } | 401 } |
| 395 }; | 402 }; |
| OLD | NEW |