| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 { | 213 { |
| 214 if (!this._lazyFrameModel) { | 214 if (!this._lazyFrameModel) { |
| 215 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel()
; | 215 var tracingFrameModel = new WebInspector.TracingTimelineFrameModel()
; |
| 216 tracingFrameModel.addTraceEvents(this._model.target(), this._model.i
nspectedTargetEvents(), this._tracingModel.sessionId() || ""); | 216 tracingFrameModel.addTraceEvents(this._model.target(), this._model.i
nspectedTargetEvents(), this._tracingModel.sessionId() || ""); |
| 217 this._lazyFrameModel = tracingFrameModel; | 217 this._lazyFrameModel = tracingFrameModel; |
| 218 } | 218 } |
| 219 return this._lazyFrameModel; | 219 return this._lazyFrameModel; |
| 220 }, | 220 }, |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * @return {!WebInspector.TimelineView} | |
| 224 */ | |
| 225 _timelineView: function() | |
| 226 { | |
| 227 if (!this._lazyTimelineView) | |
| 228 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m
odel); | |
| 229 return this._lazyTimelineView; | |
| 230 }, | |
| 231 | |
| 232 /** | |
| 233 * @return {!WebInspector.View} | 223 * @return {!WebInspector.View} |
| 234 */ | 224 */ |
| 235 _layersView: function() | 225 _layersView: function() |
| 236 { | 226 { |
| 237 if (this._lazyLayersView) | 227 if (this._lazyLayersView) |
| 238 return this._lazyLayersView; | 228 return this._lazyLayersView; |
| 239 this._lazyLayersView = new WebInspector.TimelineLayersView(); | 229 this._lazyLayersView = new WebInspector.TimelineLayersView(); |
| 240 this._lazyLayersView.setTimelineModelAndDelegate(this._model, this); | 230 this._lazyLayersView.setTimelineModelAndDelegate(this._model, this); |
| 241 return this._lazyLayersView; | 231 return this._lazyLayersView; |
| 242 }, | 232 }, |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 if (this._flameChartEnabledSetting.get()) { | 591 if (this._flameChartEnabledSetting.get()) { |
| 602 this._filterBar.filterButton().setEnabled(false); | 592 this._filterBar.filterButton().setEnabled(false); |
| 603 this._filtersContainer.classList.toggle("hidden", true); | 593 this._filtersContainer.classList.toggle("hidden", true); |
| 604 this._flameChart = new WebInspector.TimelineFlameChartView(this, thi
s._model, this._frameModel()); | 594 this._flameChart = new WebInspector.TimelineFlameChartView(this, thi
s._model, this._frameModel()); |
| 605 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()
); | 595 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()
); |
| 606 this._addModeView(this._flameChart); | 596 this._addModeView(this._flameChart); |
| 607 } else { | 597 } else { |
| 608 this._flameChart = null; | 598 this._flameChart = null; |
| 609 this._filterBar.filterButton().setEnabled(true); | 599 this._filterBar.filterButton().setEnabled(true); |
| 610 this._filtersContainer.classList.toggle("hidden", !this._filterBar.f
iltersToggled()); | 600 this._filtersContainer.classList.toggle("hidden", !this._filterBar.f
iltersToggled()); |
| 611 this._addModeView(this._timelineView()); | 601 var timelineView = new WebInspector.TimelineView(this, this._model) |
| 602 this._addModeView(timelineView); |
| 603 timelineView.setFrameModel(isFrameMode ? this._frameModel() : null); |
| 612 } | 604 } |
| 613 | 605 |
| 614 if (this._captureMemorySetting.get()) { | 606 if (this._captureMemorySetting.get()) { |
| 615 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 607 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
| 616 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model)); | 608 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model)); |
| 617 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel)); | 609 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel)); |
| 618 } | 610 } |
| 619 | 611 |
| 620 var mainTarget = WebInspector.targetManager.mainTarget(); | 612 var mainTarget = WebInspector.targetManager.mainTarget(); |
| 621 if (this._lazyTimelineView) | |
| 622 this._lazyTimelineView.setFrameModel(isFrameMode ? this._frameModel(
) : null); | |
| 623 | |
| 624 this._overviewPane.setOverviewControls(this._overviewControls); | 613 this._overviewPane.setOverviewControls(this._overviewControls); |
| 625 this.doResize(); | 614 this.doResize(); |
| 626 this._selection = null; | 615 this._selection = null; |
| 627 this._updateSelectionDetails(); | 616 this._updateSelectionDetails(); |
| 628 | 617 |
| 629 this._stackView.show(this._searchableView.element); | 618 this._stackView.show(this._searchableView.element); |
| 630 }, | 619 }, |
| 631 | 620 |
| 632 _onNetworkChanged: function() | 621 _onNetworkChanged: function() |
| 633 { | 622 { |
| (...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 * @override | 1747 * @override |
| 1759 * @param {string} value | 1748 * @param {string} value |
| 1760 */ | 1749 */ |
| 1761 handleQueryParam: function(value) | 1750 handleQueryParam: function(value) |
| 1762 { | 1751 { |
| 1763 WebInspector.TimelinePanel.show(); | 1752 WebInspector.TimelinePanel.show(); |
| 1764 WebInspector.TimelinePanel.instance()._loadFromURL(value); | 1753 WebInspector.TimelinePanel.instance()._loadFromURL(value); |
| 1765 } | 1754 } |
| 1766 } | 1755 } |
| 1767 | 1756 |
| OLD | NEW |