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

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

Issue 183893010: DevTools: extract TimelineModel.Record from TimelinePresentationModel.Record. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing 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/CountersGraph.js ('k') | Source/devtools/front_end/TimelineEventOverview.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/MemoryStatistics.js
diff --git a/Source/devtools/front_end/MemoryStatistics.js b/Source/devtools/front_end/MemoryStatistics.js
index 5ce687a9d0a689f00fd0843f1267bfd1a35be861..5e31d666abbc407369c38952610dfa8ccf144a5a 100644
--- a/Source/devtools/front_end/MemoryStatistics.js
+++ b/Source/devtools/front_end/MemoryStatistics.js
@@ -32,17 +32,17 @@
* @constructor
* @extends {WebInspector.SplitView}
* @param {!WebInspector.TimelineModeViewDelegate} delegate
- * @param {!WebInspector.TimelinePresentationModel} presentationModel
+ * @param {!WebInspector.TimelineModel} model
*/
-WebInspector.MemoryStatistics = function(delegate, presentationModel)
+WebInspector.MemoryStatistics = function(delegate, model)
{
WebInspector.SplitView.call(this, true, false);
this.element.id = "memory-graphs-container";
this._delegate = delegate;
- this._presentationModel = presentationModel;
- this._calculator = new WebInspector.TimelineCalculator(this._presentationModel);
+ this._model = model;
+ this._calculator = new WebInspector.TimelineCalculator(this._model);
this._graphsContainer = this.mainElement();
this._createCurrentValuesBar();
@@ -257,10 +257,9 @@ WebInspector.MemoryStatistics.prototype = {
},
/**
- * @param {!TimelineAgent.TimelineEvent} record
- * @param {!Array.<!WebInspector.TimelinePresentationModel.Record>} presentationRecords
+ * @param {!WebInspector.TimelineModel.Record} record
*/
- addRecord: function(record, presentationRecords)
+ addRecord: function(record)
{
throw new Error("Not implemented");
},
@@ -344,7 +343,7 @@ WebInspector.MemoryStatistics.prototype = {
var recordToReveal;
function findRecordToReveal(record)
{
- if (record.containsTime(time)) {
+ if (record.startTime <= time && time <= record.endTime) {
recordToReveal = record;
return true;
}
@@ -353,8 +352,7 @@ WebInspector.MemoryStatistics.prototype = {
recordToReveal = record;
return false;
}
- WebInspector.TimelinePresentationModel.forAllRecords(this._presentationModel.rootRecord().children, null, findRecordToReveal);
-
+ this._model.forAllRecords(null, findRecordToReveal);
this._delegate.selectRecord(recordToReveal);
},
@@ -420,7 +418,7 @@ WebInspector.MemoryStatistics.prototype = {
},
/**
- * @param {?WebInspector.TimelinePresentationModel.Record} record
+ * @param {?WebInspector.TimelineModel.Record} record
* @param {string=} regex
* @param {boolean=} selectRecord
*/
@@ -429,7 +427,7 @@ WebInspector.MemoryStatistics.prototype = {
},
/**
- * @param {?WebInspector.TimelinePresentationModel.Record} record
+ * @param {?WebInspector.TimelineModel.Record} record
*/
setSelectedRecord: function(record)
{
« no previous file with comments | « Source/devtools/front_end/CountersGraph.js ('k') | Source/devtools/front_end/TimelineEventOverview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698