OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 requestWindowTimes: function(windowStartTime, windowEndTime) | 240 requestWindowTimes: function(windowStartTime, windowEndTime) |
241 { | 241 { |
242 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); | 242 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); |
243 }, | 243 }, |
244 | 244 |
245 /** | 245 /** |
246 * @return {!WebInspector.TimelineFrameModel} | 246 * @return {!WebInspector.TimelineFrameModel} |
247 */ | 247 */ |
248 _frameModel: function() | 248 _frameModel: function() |
249 { | 249 { |
250 if (!this._lazyFrameModel) | 250 if (!this._lazyFrameModel) { |
251 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el); | 251 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el); |
| 252 if (this._lazyTracingModel) |
| 253 this._lazyFrameModel.addTraceEvents(this._lazyTracingModel.inspe
ctedTargetEvents(), this._lazyTracingModel.sessionId()); |
| 254 |
| 255 } |
252 return this._lazyFrameModel; | 256 return this._lazyFrameModel; |
253 }, | 257 }, |
254 | 258 |
255 /** | 259 /** |
256 * @return {!WebInspector.TracingModel} | 260 * @return {!WebInspector.TracingModel} |
257 */ | 261 */ |
258 _tracingModel: function() | 262 _tracingModel: function() |
259 { | 263 { |
260 if (!this._lazyTracingModel) { | 264 if (!this._lazyTracingModel) { |
261 this._lazyTracingModel = new WebInspector.TracingModel(WebInspector.
targetManager.activeTarget()); | 265 this._lazyTracingModel = new WebInspector.TracingModel(WebInspector.
targetManager.activeTarget()); |
262 this._lazyTracingModel.addEventListener(WebInspector.TracingModel.Ev
ents.BufferUsage, this._onTracingBufferUsage, this); | 266 this._lazyTracingModel.addEventListener(WebInspector.TracingModel.Ev
ents.BufferUsage, this._onTracingBufferUsage, this); |
263 } | 267 } |
264 return this._lazyTracingModel; | 268 return this._lazyTracingModel; |
265 }, | 269 }, |
266 | 270 |
267 /** | 271 /** |
268 * @return {!WebInspector.TimelineTraceEventBindings} | 272 * @return {!WebInspector.TimelineTraceEventBindings} |
269 */ | 273 */ |
270 _traceEventBindings: function() | 274 _traceEventBindings: function() |
271 { | 275 { |
272 if (!this._lazyTraceEventBindings) { | 276 if (!this._lazyTraceEventBindings) { |
273 this._lazyTraceEventBindings = new WebInspector.TimelineTraceEventBi
ndings(); | 277 this._lazyTraceEventBindings = new WebInspector.TimelineTraceEventBi
ndings(); |
274 if (this._lazyTracingModel) | 278 if (this._lazyTracingModel) |
275 this._lazyTraceEventBindings.setEvents(this._lazyTracingModel.in
spectedTargetMainThreadEvents()); | 279 this._lazyTraceEventBindings.setEvents(this._lazyTracingModel.in
spectedTargetEvents()); |
276 } | 280 } |
277 return this._lazyTraceEventBindings; | 281 return this._lazyTraceEventBindings; |
278 }, | 282 }, |
279 | 283 |
280 /** | 284 /** |
281 * @return {!WebInspector.TimelineView} | 285 * @return {!WebInspector.TimelineView} |
282 */ | 286 */ |
283 _timelineView: function() | 287 _timelineView: function() |
284 { | 288 { |
285 if (!this._lazyTimelineView) | 289 if (!this._lazyTimelineView) |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 this._lazyTracingModel.stop(this._onTracingComplete.bind(this)); | 693 this._lazyTracingModel.stop(this._onTracingComplete.bind(this)); |
690 | 694 |
691 for (var i = 0; i < this._overviewControls.length; ++i) | 695 for (var i = 0; i < this._overviewControls.length; ++i) |
692 this._overviewControls[i].timelineStopped(); | 696 this._overviewControls[i].timelineStopped(); |
693 }, | 697 }, |
694 | 698 |
695 _onTracingComplete: function() | 699 _onTracingComplete: function() |
696 { | 700 { |
697 if (this._lazyFrameModel) { | 701 if (this._lazyFrameModel) { |
698 this._lazyFrameModel.reset(); | 702 this._lazyFrameModel.reset(); |
699 this._lazyFrameModel.addTraceEvents(this._lazyTracingModel); | 703 this._lazyFrameModel.addTraceEvents(this._lazyTracingModel.inspected
TargetEvents(), this._lazyTracingModel.sessionId()); |
700 this._overviewPane.update(); | 704 this._overviewPane.update(); |
701 } | 705 } |
702 if (this._lazyTraceEventBindings) | 706 if (this._lazyTraceEventBindings) |
703 this._lazyTraceEventBindings.setEvents(this._lazyTracingModel.inspec
tedTargetMainThreadEvents()); | 707 this._lazyTraceEventBindings.setEvents(this._lazyTracingModel.inspec
tedTargetEvents()); |
704 this._refreshViews(); | 708 this._refreshViews(); |
705 }, | 709 }, |
706 | 710 |
707 _onProfilingStateChanged: function() | 711 _onProfilingStateChanged: function() |
708 { | 712 { |
709 this._updateToggleTimelineButton(this.toggleTimelineButton.toggled); | 713 this._updateToggleTimelineButton(this.toggleTimelineButton.toggled); |
710 }, | 714 }, |
711 | 715 |
712 /** | 716 /** |
713 * @param {boolean} toggled | 717 * @param {boolean} toggled |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 * @param {!WebInspector.TimelineModel.Record} record | 1445 * @param {!WebInspector.TimelineModel.Record} record |
1442 * @return {boolean} | 1446 * @return {boolean} |
1443 */ | 1447 */ |
1444 accept: function(record) | 1448 accept: function(record) |
1445 { | 1449 { |
1446 return !this._hiddenRecords[record.type()]; | 1450 return !this._hiddenRecords[record.type()]; |
1447 }, | 1451 }, |
1448 | 1452 |
1449 __proto__: WebInspector.TimelineModel.Filter.prototype | 1453 __proto__: WebInspector.TimelineModel.Filter.prototype |
1450 } | 1454 } |
OLD | NEW |