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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 { | 242 { |
243 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); | 243 this._overviewPane.requestWindowTimes(windowStartTime, windowEndTime); |
244 }, | 244 }, |
245 | 245 |
246 /** | 246 /** |
247 * @return {!WebInspector.TimelineFrameModel} | 247 * @return {!WebInspector.TimelineFrameModel} |
248 */ | 248 */ |
249 _frameModel: function() | 249 _frameModel: function() |
250 { | 250 { |
251 if (!this._lazyFrameModel) { | 251 if (!this._lazyFrameModel) { |
252 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el); | 252 this._lazyFrameModel = new WebInspector.TimelineFrameModel(this._mod
el.target()); |
| 253 this._lazyFrameModel.setMergeRecords(!WebInspector.experimentsSettin
gs.timelineNoLiveUpdate.isEnabled() || !this._recordingInProgress); |
| 254 this._lazyFrameModel.addRecords(this._model.records()); |
253 if (this._lazyTracingModel) | 255 if (this._lazyTracingModel) |
254 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i
nspectedTargetEvents(), this._lazyTracingModel.sessionId()); | 256 this._lazyFrameModel.addTraceEvents(this._tracingTimelineModel.i
nspectedTargetEvents(), this._lazyTracingModel.sessionId()); |
255 | |
256 } | 257 } |
257 return this._lazyFrameModel; | 258 return this._lazyFrameModel; |
258 }, | 259 }, |
259 | 260 |
260 /** | 261 /** |
261 * @return {!WebInspector.TracingModel} | 262 * @return {!WebInspector.TracingModel} |
262 */ | 263 */ |
263 _tracingModel: function() | 264 _tracingModel: function() |
264 { | 265 { |
265 if (!this._lazyTracingModel) { | 266 if (!this._lazyTracingModel) { |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 this._model.willStartRecordingTraceEvents(); | 665 this._model.willStartRecordingTraceEvents(); |
665 this._tracingModel().start(categories.join(","), ""); | 666 this._tracingModel().start(categories.join(","), ""); |
666 this._tracingTimelineModel.willStartRecordingTraceEvents(); | 667 this._tracingTimelineModel.willStartRecordingTraceEvents(); |
667 } else { | 668 } else { |
668 this._model.startRecording(this._captureStacksSetting.get(), this._c
aptureMemorySetting.get()); | 669 this._model.startRecording(this._captureStacksSetting.get(), this._c
aptureMemorySetting.get()); |
669 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()
) { | 670 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()
) { |
670 this._tracingModel().start(WebInspector.TimelinePanel.defaultTra
cingCategoryFilter, ""); | 671 this._tracingModel().start(WebInspector.TimelinePanel.defaultTra
cingCategoryFilter, ""); |
671 this._tracingTimelineModel.willStartRecordingTraceEvents(); | 672 this._tracingTimelineModel.willStartRecordingTraceEvents(); |
672 } | 673 } |
673 } | 674 } |
| 675 if (WebInspector.experimentsSettings.timelineNoLiveUpdate.isEnabled() &&
this._lazyFrameModel) |
| 676 this._lazyFrameModel.setMergeRecords(false); |
| 677 |
674 for (var i = 0; i < this._overviewControls.length; ++i) | 678 for (var i = 0; i < this._overviewControls.length; ++i) |
675 this._overviewControls[i].timelineStarted(); | 679 this._overviewControls[i].timelineStarted(); |
676 | 680 |
677 if (userInitiated) | 681 if (userInitiated) |
678 WebInspector.userMetrics.TimelineStarted.record(); | 682 WebInspector.userMetrics.TimelineStarted.record(); |
679 }, | 683 }, |
680 | 684 |
681 _stopRecording: function() | 685 _stopRecording: function() |
682 { | 686 { |
683 this._userInitiatedRecording = false; | 687 this._userInitiatedRecording = false; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
810 _hideProgressPane: function() | 814 _hideProgressPane: function() |
811 { | 815 { |
812 if (this._progressElement) | 816 if (this._progressElement) |
813 this._progressElement.remove(); | 817 this._progressElement.remove(); |
814 delete this._progressElement; | 818 delete this._progressElement; |
815 }, | 819 }, |
816 | 820 |
817 _onRecordingStopped: function() | 821 _onRecordingStopped: function() |
818 { | 822 { |
819 this._updateToggleTimelineButton(false); | 823 this._updateToggleTimelineButton(false); |
| 824 if (this._lazyFrameModel && WebInspector.experimentsSettings.timelineNoL
iveUpdate.isEnabled()) { |
| 825 this._lazyFrameModel.reset(); |
| 826 this._lazyFrameModel.addRecords(this._model.records()); |
| 827 } |
820 this._hideProgressPane(); | 828 this._hideProgressPane(); |
821 }, | 829 }, |
822 | 830 |
823 _onRecordAdded: function(event) | 831 _onRecordAdded: function(event) |
824 { | 832 { |
825 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event.
data)); | 833 this._addRecord(/** @type {!WebInspector.TimelineModel.Record} */(event.
data)); |
826 }, | 834 }, |
827 | 835 |
828 /** | 836 /** |
829 * @param {!WebInspector.TimelineModel.Record} record | 837 * @param {!WebInspector.TimelineModel.Record} record |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 * @param {!WebInspector.TimelineModel.Record} record | 1447 * @param {!WebInspector.TimelineModel.Record} record |
1440 * @return {boolean} | 1448 * @return {boolean} |
1441 */ | 1449 */ |
1442 accept: function(record) | 1450 accept: function(record) |
1443 { | 1451 { |
1444 return !this._hiddenRecords[record.type()]; | 1452 return !this._hiddenRecords[record.type()]; |
1445 }, | 1453 }, |
1446 | 1454 |
1447 __proto__: WebInspector.TimelineModel.Filter.prototype | 1455 __proto__: WebInspector.TimelineModel.Filter.prototype |
1448 } | 1456 } |
OLD | NEW |