| OLD | NEW |
| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 _findAncestorEvent: function(name) | 432 _findAncestorEvent: function(name) |
| 433 { | 433 { |
| 434 for (var i = this._eventStack.length - 1; i >= 0; --i) { | 434 for (var i = this._eventStack.length - 1; i >= 0; --i) { |
| 435 var event = this._eventStack[i]; | 435 var event = this._eventStack[i]; |
| 436 if (event.name === name) | 436 if (event.name === name) |
| 437 return event; | 437 return event; |
| 438 } | 438 } |
| 439 return null; | 439 return null; |
| 440 }, | 440 }, |
| 441 | 441 |
| 442 /** |
| 443 * @param {!WebInspector.TimelineModel.Record} record |
| 444 * @return {!WebInspector.TracingModel.Event} |
| 445 */ |
| 446 traceEventFrom: function(record) |
| 447 { |
| 448 if (!(record instanceof WebInspector.TracingTimelineModel.TraceEventReco
rd)) |
| 449 throw new Error("Illegal argument."); |
| 450 return record._event; |
| 451 }, |
| 452 |
| 442 __proto__: WebInspector.TimelineModel.prototype | 453 __proto__: WebInspector.TimelineModel.prototype |
| 443 } | 454 } |
| 444 | 455 |
| 445 /** | 456 /** |
| 446 * @constructor | 457 * @constructor |
| 447 * @implements {WebInspector.TimelineModel.Record} | 458 * @implements {WebInspector.TimelineModel.Record} |
| 448 * @param {!WebInspector.TimelineModel} model | 459 * @param {!WebInspector.TimelineModel} model |
| 449 * @param {!WebInspector.TracingModel.Event} traceEvent | 460 * @param {!WebInspector.TracingModel.Event} traceEvent |
| 450 * @param {?WebInspector.TracingTimelineModel.TraceEventRecord} parentRecord | 461 * @param {?WebInspector.TracingTimelineModel.TraceEventRecord} parentRecord |
| 451 */ | 462 */ |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 { | 654 { |
| 644 var tokens = [this.title()]; | 655 var tokens = [this.title()]; |
| 645 var data = this._event.args.data; | 656 var data = this._event.args.data; |
| 646 if (data) { | 657 if (data) { |
| 647 for (var key in data) | 658 for (var key in data) |
| 648 tokens.push(data[key]); | 659 tokens.push(data[key]); |
| 649 } | 660 } |
| 650 return regExp.test(tokens.join("|")); | 661 return regExp.test(tokens.join("|")); |
| 651 } | 662 } |
| 652 } | 663 } |
| OLD | NEW |