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

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

Issue 423433004: DevTools: move the "Capture *" checkboxes from timeline sidebar to the toolbar. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 /** 278 /**
279 * @return {number} 279 * @return {number}
280 */ 280 */
281 maximumRecordTime: function() 281 maximumRecordTime: function()
282 { 282 {
283 return this._maximumRecordTime; 283 return this._maximumRecordTime;
284 }, 284 },
285 285
286 /** 286 /**
287 * @return {boolean}
288 */
289 isEmpty: function()
290 {
291 return this.minimumRecordTime() === 0 && this.maximumRecordTime() === 0;
292 },
293
294 /**
287 * @param {!WebInspector.TimelineModel.Record} record 295 * @param {!WebInspector.TimelineModel.Record} record
288 */ 296 */
289 _updateBoundaries: function(record) 297 _updateBoundaries: function(record)
290 { 298 {
291 var startTime = record.startTime(); 299 var startTime = record.startTime();
292 var endTime = record.endTime(); 300 var endTime = record.endTime();
293 301
294 if (!this._minimumRecordTime || startTime < this._minimumRecordTime) 302 if (!this._minimumRecordTime || startTime < this._minimumRecordTime)
295 this._minimumRecordTime = startTime; 303 this._minimumRecordTime = startTime;
296 if (endTime > this._maximumRecordTime) 304 if (endTime > this._maximumRecordTime)
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 function recordTimestampComparator(a, b) 562 function recordTimestampComparator(a, b)
555 { 563 {
556 // Never return 0, as the merge function will squash identical entri es. 564 // Never return 0, as the merge function will squash identical entri es.
557 return a.startTime() < b.startTime() ? -1 : 1; 565 return a.startTime() < b.startTime() ? -1 : 1;
558 } 566 }
559 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator); 567 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator);
560 this._backgroundRecordsBuffer = []; 568 this._backgroundRecordsBuffer = [];
561 return result; 569 return result;
562 } 570 }
563 } 571 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698