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

Unified Diff: Source/devtools/front_end/TimelineUIUtils.js

Issue 185233002: DevTools: remove timeline presentation model dependency from record. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comments addressed. Created 6 years, 10 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
« no previous file with comments | « Source/devtools/front_end/TimelinePresentationModel.js ('k') | Source/devtools/front_end/TimelineView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/TimelineUIUtils.js b/Source/devtools/front_end/TimelineUIUtils.js
index 3723c21322d3319548bbabc594954f2952a2f608..f2c58ad3c358e8d0b089bda72332cfe47d46d839 100644
--- a/Source/devtools/front_end/TimelineUIUtils.js
+++ b/Source/devtools/front_end/TimelineUIUtils.js
@@ -202,11 +202,11 @@ WebInspector.TimelineUIUtils.createEventDivider = function(recordType, title)
/**
- * @param {!WebInspector.TimelinePresentationModel} presentationModel
+ * @param {!WebInspector.TimelineModel} model
* @param {!{name: string, tasks: !Array.<!{startTime: number, endTime: number}>, firstTaskIndex: number, lastTaskIndex: number}} info
* @return {!Element}
*/
-WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(presentationModel, info)
+WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(model, info)
{
var firstTaskIndex = info.firstTaskIndex;
var lastTaskIndex = info.lastTaskIndex;
@@ -224,7 +224,7 @@ WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(presen
var contentHelper = new WebInspector.TimelinePopupContentHelper(info.name);
var durationText = WebInspector.UIString("%s (at %s)", Number.millisToString(duration, true),
- Number.millisToString(startTime - presentationModel.minimumRecordTime(), true));
+ Number.millisToString(startTime - model.minimumRecordTime(), true));
contentHelper.appendTextRow(WebInspector.UIString("Duration"), durationText);
contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.millisToString(cpuTime, true));
contentHelper.appendTextRow(WebInspector.UIString("Message Count"), messageCount);
@@ -232,16 +232,16 @@ WebInspector.TimelineUIUtils.generateMainThreadBarPopupContent = function(presen
}
/**
- * @param {!WebInspector.TimelinePresentationModel} presentationModel
+ * @param {!WebInspector.TimelineModel} model
* @param {!TimelineAgent.TimelineEvent} record
* @return {string}
*/
-WebInspector.TimelineUIUtils.recordTitle = function(presentationModel, record)
+WebInspector.TimelineUIUtils.recordTitle = function(model, record)
{
if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp)
return record.data["message"];
if (WebInspector.TimelineUIUtils.isEventDivider(record)) {
- var startTime = Number.millisToString(record.startTime - presentationModel.minimumRecordTime());
+ var startTime = Number.millisToString(record.startTime - model.minimumRecordTime());
return WebInspector.UIString("%s at %s", WebInspector.TimelineUIUtils.recordStyle(record).title, startTime, true);
}
return WebInspector.TimelineUIUtils.recordStyle(record).title;
« no previous file with comments | « Source/devtools/front_end/TimelinePresentationModel.js ('k') | Source/devtools/front_end/TimelineView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698