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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineModelImpl.js

Issue 339493006: Move divider detection and creation onto TimelineUIUtils instance (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineOverviewPane.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 * @extends {WebInspector.TimelineModel} 7 * @extends {WebInspector.TimelineModel}
8 * @param {!WebInspector.TimelineManager} timelineManager 8 * @param {!WebInspector.TimelineManager} timelineManager
9 */ 9 */
10 WebInspector.TimelineModelImpl = function(timelineManager) 10 WebInspector.TimelineModelImpl = function(timelineManager)
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 }, 161 },
162 162
163 /** 163 /**
164 * @param {!TimelineAgent.TimelineEvent} payload 164 * @param {!TimelineAgent.TimelineEvent} payload
165 * @param {?WebInspector.TimelineModel.Record} parentRecord 165 * @param {?WebInspector.TimelineModel.Record} parentRecord
166 * @return {!WebInspector.TimelineModel.Record} 166 * @return {!WebInspector.TimelineModel.Record}
167 */ 167 */
168 _innerAddRecord: function(payload, parentRecord) 168 _innerAddRecord: function(payload, parentRecord)
169 { 169 {
170 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa rentRecord); 170 var record = new WebInspector.TimelineModel.RecordImpl(this, payload, pa rentRecord);
171 if (WebInspector.TimelineUIUtils.isEventDivider(record)) 171 if (WebInspector.TimelineUIUtilsImpl.isEventDivider(record))
172 this._eventDividerRecords.push(record); 172 this._eventDividerRecords.push(record);
173 173
174 for (var i = 0; payload.children && i < payload.children.length; ++i) 174 for (var i = 0; payload.children && i < payload.children.length; ++i)
175 this._innerAddRecord.call(this, payload.children[i], record); 175 this._innerAddRecord.call(this, payload.children[i], record);
176 176
177 record._calculateAggregatedStats(); 177 record._calculateAggregatedStats();
178 if (parentRecord) 178 if (parentRecord)
179 parentRecord._selfTime -= record.endTime() - record.startTime(); 179 parentRecord._selfTime -= record.endTime() - record.startTime();
180 return record; 180 return record;
181 }, 181 },
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 break; 750 break;
751 length += itemLength; 751 length += itemLength;
752 data.push(item); 752 data.push(item);
753 ++this._recordIndex; 753 ++this._recordIndex;
754 } 754 }
755 if (this._recordIndex === this._payloads.length) 755 if (this._recordIndex === this._payloads.length)
756 data.push(data.pop() + "]"); 756 data.push(data.pop() + "]");
757 stream.write(data.join(separator), this._writeNextChunk.bind(this)); 757 stream.write(data.join(separator), this._writeNextChunk.bind(this));
758 } 758 }
759 } 759 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TimelineOverviewPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698