| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |