Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1940)

Unified Diff: Source/devtools/front_end/timeline/TimelineView.js

Issue 339493005: Move more methods into implementation specific timeline UI utils (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineView.js
diff --git a/Source/devtools/front_end/timeline/TimelineView.js b/Source/devtools/front_end/timeline/TimelineView.js
index bb952f8492fe753e1a05a93da817bb0a54b1fbe8..918440c99787a4bd28e5b8508e246c73c767960e 100644
--- a/Source/devtools/front_end/timeline/TimelineView.js
+++ b/Source/devtools/front_end/timeline/TimelineView.js
@@ -581,7 +581,7 @@ WebInspector.TimelineView.prototype = {
this._graphRowsElement.appendChild(graphRowElement);
}
- listRowElement.row.update(record, visibleTop, this._model.loadedFromFile());
+ listRowElement.row.update(record, visibleTop, this._model.loadedFromFile(), this._uiUtils);
graphRowElement.row.update(record, this._calculator, this._expandOffset, i);
if (this._lastSelectedRecord === record) {
listRowElement.row.renderAsSelected(true);
@@ -1048,8 +1048,9 @@ WebInspector.TimelineRecordListRow.prototype = {
* @param {!WebInspector.TimelinePresentationModel.Record} presentationRecord
* @param {number} offset
* @param {boolean} loadedFromFile
+ * @param {!WebInspector.TimelineUIUtils} uiUtils
*/
- update: function(presentationRecord, offset, loadedFromFile)
+ update: function(presentationRecord, offset, loadedFromFile, uiUtils)
{
this._record = presentationRecord;
var record = presentationRecord.record();
@@ -1075,9 +1076,7 @@ WebInspector.TimelineRecordListRow.prototype = {
if (presentationRecord.coalesced()) {
this._dataElement.createTextChild(WebInspector.UIString("× %d", presentationRecord.presentationChildren().length));
} else {
- var detailsNode = record instanceof WebInspector.TimelineModel.RecordImpl ?
- WebInspector.TimelineUIUtils.buildDetailsNode(record, this._linkifier, loadedFromFile) :
- WebInspector.TracingTimelineUIUtils.buildDetailsNodeForTraceEvent(record._event, this._linkifier, loadedFromFile, record.target());
+ var detailsNode = uiUtils.buildDetailsNode(record, this._linkifier, loadedFromFile);
if (detailsNode) {
this._dataElement.appendChild(document.createTextNode("("));
this._dataElement.appendChild(detailsNode);
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineUIUtilsImpl.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698