| 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   /** |   10   /** | 
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  279       return null; |  279       return null; | 
|  280     var element = createElement('div'); |  280     var element = createElement('div'); | 
|  281     var root = UI.createShadowRootWithCoreStyles(element, 'timeline/timelineFlam
     echartPopover.css'); |  281     var root = UI.createShadowRootWithCoreStyles(element, 'timeline/timelineFlam
     echartPopover.css'); | 
|  282     var contents = root.createChild('div', 'timeline-flamechart-popover'); |  282     var contents = root.createChild('div', 'timeline-flamechart-popover'); | 
|  283     var duration = request.endTime - request.startTime; |  283     var duration = request.endTime - request.startTime; | 
|  284     if (request.startTime && isFinite(duration)) |  284     if (request.startTime && isFinite(duration)) | 
|  285       contents.createChild('span', 'timeline-info-network-time').textContent = N
     umber.millisToString(duration); |  285       contents.createChild('span', 'timeline-info-network-time').textContent = N
     umber.millisToString(duration); | 
|  286     if (typeof request.priority === 'string') { |  286     if (typeof request.priority === 'string') { | 
|  287       var div = contents.createChild('span'); |  287       var div = contents.createChild('span'); | 
|  288       div.textContent = |  288       div.textContent = | 
|  289           Components.uiLabelForPriority(/** @type {!Protocol.Network.ResourcePri
     ority} */ (request.priority)); |  289           NetworkConditions.uiLabelForPriority(/** @type {!Protocol.Network.Reso
     urcePriority} */ (request.priority)); | 
|  290       div.style.color = this._colorForPriority(request.priority) || 'black'; |  290       div.style.color = this._colorForPriority(request.priority) || 'black'; | 
|  291     } |  291     } | 
|  292     contents.createChild('span').textContent = request.url.trimMiddle(maxURLChar
     s); |  292     contents.createChild('span').textContent = request.url.trimMiddle(maxURLChar
     s); | 
|  293     return element; |  293     return element; | 
|  294   } |  294   } | 
|  295  |  295  | 
|  296   /** |  296   /** | 
|  297    * @param {string} priority |  297    * @param {string} priority | 
|  298    * @return {?string} |  298    * @return {?string} | 
|  299    */ |  299    */ | 
|  300   _colorForPriority(priority) { |  300   _colorForPriority(priority) { | 
|  301     if (!this._priorityToValue) { |  301     if (!this._priorityToValue) { | 
|  302       var priorities = Protocol.Network.ResourcePriority; |  302       var priorities = Protocol.Network.ResourcePriority; | 
|  303       this._priorityToValue = new Map([ |  303       this._priorityToValue = new Map([ | 
|  304         [priorities.VeryLow, 1], |  304         [priorities.VeryLow, 1], [priorities.Low, 2], [priorities.Medium, 3], [p
     riorities.High, 4], | 
|  305         [priorities.Low, 2], |  305         [priorities.VeryHigh, 5] | 
|  306         [priorities.Medium, 3], |  306       ]); | 
|  307         [priorities.High, 4], |  | 
|  308         [priorities.VeryHigh, 5]]); |  | 
|  309     } |  307     } | 
|  310     var value = this._priorityToValue.get(priority); |  308     var value = this._priorityToValue.get(priority); | 
|  311     return value ? `hsla(214, 80%, 50%, ${value / 5})` : null; |  309     return value ? `hsla(214, 80%, 50%, ${value / 5})` : null; | 
|  312   } |  310   } | 
|  313  |  311  | 
|  314   /** |  312   /** | 
|  315    * @param {!Array.<!SDK.TracingModel.Event>} events |  313    * @param {!Array.<!SDK.TracingModel.Event>} events | 
|  316    */ |  314    */ | 
|  317   _appendTimelineData(events) { |  315   _appendTimelineData(events) { | 
|  318     this._minimumBoundary = this._model.minimumRecordTime(); |  316     this._minimumBoundary = this._model.minimumRecordTime(); | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  380  |  378  | 
|  381   /** |  379   /** | 
|  382    * @override |  380    * @override | 
|  383    * @param {number} entryIndex |  381    * @param {number} entryIndex | 
|  384    * @return {boolean} |  382    * @return {boolean} | 
|  385    */ |  383    */ | 
|  386   canJumpToEntry(entryIndex) { |  384   canJumpToEntry(entryIndex) { | 
|  387     return false; |  385     return false; | 
|  388   } |  386   } | 
|  389 }; |  387 }; | 
| OLD | NEW |