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 * @constructor | 6 * @constructor |
7 * @implements {WebInspector.Searchable} | 7 * @implements {WebInspector.Searchable} |
8 * @extends {WebInspector.ProfileView} | 8 * @extends {WebInspector.ProfileView} |
9 * @param {!WebInspector.SamplingHeapProfileHeader} profileHeader | 9 * @param {!WebInspector.SamplingHeapProfileHeader} profileHeader |
10 */ | 10 */ |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 this._maxStackDepth = maxDepth + 1; | 402 this._maxStackDepth = maxDepth + 1; |
403 this._entryNodes = entryNodes; | 403 this._entryNodes = entryNodes; |
404 this._timelineData = new WebInspector.FlameChart.TimelineData(entryLevel
s, entryTotalTimes, entryStartTimes, null); | 404 this._timelineData = new WebInspector.FlameChart.TimelineData(entryLevel
s, entryTotalTimes, entryStartTimes, null); |
405 | 405 |
406 return this._timelineData; | 406 return this._timelineData; |
407 }, | 407 }, |
408 | 408 |
409 /** | 409 /** |
410 * @override | 410 * @override |
411 * @param {number} entryIndex | 411 * @param {number} entryIndex |
412 * @return {?Array<!{title: string, value: (string|!Element)}>} | 412 * @return {?Element} |
413 */ | 413 */ |
414 prepareHighlightedEntryInfo: function(entryIndex) | 414 prepareHighlightedEntryInfo: function(entryIndex) |
415 { | 415 { |
416 var node = this._entryNodes[entryIndex]; | 416 var node = this._entryNodes[entryIndex]; |
417 if (!node) | 417 if (!node) |
418 return null; | 418 return null; |
419 var entryInfo = []; | 419 var entryInfo = []; |
420 /** | 420 /** |
421 * @param {string} title | 421 * @param {string} title |
422 * @param {string} value | 422 * @param {string} value |
423 */ | 423 */ |
424 function pushEntryInfoRow(title, value) | 424 function pushEntryInfoRow(title, value) |
425 { | 425 { |
426 entryInfo.push({ title: title, value: value }); | 426 entryInfo.push({ title: title, value: value }); |
427 } | 427 } |
428 pushEntryInfoRow(WebInspector.UIString("Name"), WebInspector.beautifyFun
ctionName(node.functionName)); | 428 pushEntryInfoRow(WebInspector.UIString("Name"), WebInspector.beautifyFun
ctionName(node.functionName)); |
429 pushEntryInfoRow(WebInspector.UIString("Self size"), Number.bytesToStrin
g(node.self)); | 429 pushEntryInfoRow(WebInspector.UIString("Self size"), Number.bytesToStrin
g(node.self)); |
430 pushEntryInfoRow(WebInspector.UIString("Total size"), Number.bytesToStri
ng(node.total)); | 430 pushEntryInfoRow(WebInspector.UIString("Total size"), Number.bytesToStri
ng(node.total)); |
431 var linkifier = new WebInspector.Linkifier(); | 431 var linkifier = new WebInspector.Linkifier(); |
432 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.cal
lFrame); | 432 var link = linkifier.maybeLinkifyConsoleCallFrame(this._target, node.cal
lFrame); |
433 if (link) | 433 if (link) |
434 pushEntryInfoRow(WebInspector.UIString("URL"), link.textContent); | 434 pushEntryInfoRow(WebInspector.UIString("URL"), link.textContent); |
435 linkifier.dispose(); | 435 linkifier.dispose(); |
436 return entryInfo; | 436 return WebInspector.ProfileView.buildPopoverTable(entryInfo); |
437 }, | 437 }, |
438 | 438 |
439 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype | 439 __proto__: WebInspector.ProfileFlameChartDataProvider.prototype |
440 } | 440 } |
OLD | NEW |