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 12 matching lines...) Expand all Loading... |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @extends {WebInspector.SDKObject} | 33 * @extends {WebInspector.Object} |
34 * @param {!WebInspector.Target} target | |
35 */ | 34 */ |
36 WebInspector.TimelineModel = function(target) | 35 WebInspector.TimelineModel = function() |
37 { | 36 { |
38 WebInspector.SDKObject.call(this, target); | 37 WebInspector.Object.call(this); |
39 this._filters = []; | 38 this._filters = []; |
40 } | 39 } |
41 | 40 |
42 WebInspector.TimelineModel.RecordType = { | 41 WebInspector.TimelineModel.RecordType = { |
43 Root: "Root", | 42 Root: "Root", |
44 Program: "Program", | 43 Program: "Program", |
45 EventDispatch: "EventDispatch", | 44 EventDispatch: "EventDispatch", |
46 | 45 |
47 GPUTask: "GPUTask", | 46 GPUTask: "GPUTask", |
48 | 47 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 }, | 323 }, |
325 | 324 |
326 /** | 325 /** |
327 * @return {!Array.<!WebInspector.TimelineModel.Record>} | 326 * @return {!Array.<!WebInspector.TimelineModel.Record>} |
328 */ | 327 */ |
329 eventDividerRecords: function() | 328 eventDividerRecords: function() |
330 { | 329 { |
331 return this._eventDividerRecords; | 330 return this._eventDividerRecords; |
332 }, | 331 }, |
333 | 332 |
334 __proto__: WebInspector.SDKObject.prototype | 333 __proto__: WebInspector.Object.prototype |
335 } | 334 } |
336 | 335 |
337 /** | 336 /** |
338 * @interface | 337 * @interface |
339 */ | 338 */ |
340 WebInspector.TimelineModel.Record = function() | 339 WebInspector.TimelineModel.Record = function() |
341 { | 340 { |
342 } | 341 } |
343 | 342 |
344 WebInspector.TimelineModel.Record.prototype = { | 343 WebInspector.TimelineModel.Record.prototype = { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 function recordTimestampComparator(a, b) | 563 function recordTimestampComparator(a, b) |
565 { | 564 { |
566 // Never return 0, as the merge function will squash identical entri
es. | 565 // Never return 0, as the merge function will squash identical entri
es. |
567 return a.startTime() < b.startTime() ? -1 : 1; | 566 return a.startTime() < b.startTime() ? -1 : 1; |
568 } | 567 } |
569 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT
imestampComparator); | 568 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT
imestampComparator); |
570 this._backgroundRecordsBuffer = []; | 569 this._backgroundRecordsBuffer = []; |
571 return result; | 570 return result; |
572 } | 571 } |
573 } | 572 } |
OLD | NEW |