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

Side by Side Diff: Source/devtools/front_end/timeline/TracingTimelineModel.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
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 * @param {!WebInspector.TracingModel} tracingModel 6 * @param {!WebInspector.TracingModel} tracingModel
7 * @constructor 7 * @constructor
8 * @extends {WebInspector.TimelineModel} 8 * @extends {WebInspector.TimelineModel}
9 */ 9 */
10 WebInspector.TracingTimelineModel = function(tracingModel) 10 WebInspector.TracingTimelineModel = function(tracingModel)
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 for (var i = 0, size = mainThreadEvents.length; i < size; ++i) { 220 for (var i = 0, size = mainThreadEvents.length; i < size; ++i) {
221 var event = mainThreadEvents[i]; 221 var event = mainThreadEvents[i];
222 while (recordStack.length) { 222 while (recordStack.length) {
223 var top = recordStack.peekLast(); 223 var top = recordStack.peekLast();
224 if (top._event.endTime >= event.startTime) 224 if (top._event.endTime >= event.startTime)
225 break; 225 break;
226 recordStack.pop(); 226 recordStack.pop();
227 } 227 }
228 var parentRecord = recordStack.peekLast() || null; 228 var parentRecord = recordStack.peekLast() || null;
229 var record = new WebInspector.TracingTimelineModel.TraceEventRecord( this, event, parentRecord); 229 var record = new WebInspector.TracingTimelineModel.TraceEventRecord( this, event, parentRecord);
230 if (WebInspector.TimelineUIUtils.isEventDivider(record)) 230 if (WebInspector.TracingTimelineUIUtils.isEventDivider(record))
231 this._eventDividerRecords.push(record); 231 this._eventDividerRecords.push(record);
232 if (!recordStack.length) 232 if (!recordStack.length)
233 this._addTopLevelRecord(record); 233 this._addTopLevelRecord(record);
234 if (event.endTime) 234 if (event.endTime)
235 recordStack.push(record); 235 recordStack.push(record);
236 } 236 }
237 }, 237 },
238 238
239 /** 239 /**
240 * @param {!WebInspector.TracingTimelineModel.TraceEventRecord} record 240 * @param {!WebInspector.TracingTimelineModel.TraceEventRecord} record
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 }, 675 },
676 676
677 /** 677 /**
678 * @return {!WebInspector.TracingModel.Event} 678 * @return {!WebInspector.TracingModel.Event}
679 */ 679 */
680 traceEvent: function() 680 traceEvent: function()
681 { 681 {
682 return this._event; 682 return this._event;
683 } 683 }
684 } 684 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineView.js ('k') | Source/devtools/front_end/timeline/TracingTimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698