| 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 this._captureFilmStripSetting.addChangeListener(this._onModeChanged,
this); | 367 this._captureFilmStripSetting.addChangeListener(this._onModeChanged,
this); |
| 368 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Web
Inspector.UIString("Screenshots"), | 368 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Web
Inspector.UIString("Screenshots"), |
| 369 thi
s._captureFilmStripSetting, | 369 thi
s._captureFilmStripSetting, |
| 370 Web
Inspector.UIString("Capture screenshots while recording. (Has performance overhe
ad)"))); | 370 Web
Inspector.UIString("Capture screenshots while recording. (Has performance overhe
ad)"))); |
| 371 } | 371 } |
| 372 | 372 |
| 373 this._progressToolbarItem = new WebInspector.ToolbarItem(createElement("
div")); | 373 this._progressToolbarItem = new WebInspector.ToolbarItem(createElement("
div")); |
| 374 this._progressToolbarItem.setVisible(false); | 374 this._progressToolbarItem.setVisible(false); |
| 375 this._panelToolbar.appendToolbarItem(this._progressToolbarItem); | 375 this._panelToolbar.appendToolbarItem(this._progressToolbarItem); |
| 376 | 376 |
| 377 this._filtersContainer = this.element.createChild("div", "timeline-filte
rs-header hidden"); | 377 this.element.appendChild(this._filterBar.filtersElement()); |
| 378 this._filtersContainer.appendChild(this._filterBar.filtersElement()); | |
| 379 this._filterBar.addEventListener(WebInspector.FilterBar.Events.FiltersTo
ggled, this._onFiltersToggled, this); | |
| 380 this._filterBar.setName("timelinePanel"); | |
| 381 }, | 378 }, |
| 382 | 379 |
| 383 /** | 380 /** |
| 384 * @return {!WebInspector.FilterBar} | 381 * @return {!WebInspector.FilterBar} |
| 385 */ | 382 */ |
| 386 _createFilterBar: function() | 383 _createFilterBar: function() |
| 387 { | 384 { |
| 388 this._filterBar = new WebInspector.FilterBar(); | 385 this._filterBar = new WebInspector.FilterBar("timelinePanel"); |
| 389 this._filters = {}; | 386 this._filters = {}; |
| 390 this._filters._textFilterUI = new WebInspector.TextFilterUI(); | 387 this._filters._textFilterUI = new WebInspector.TextFilterUI(); |
| 391 this._filters._textFilterUI.addEventListener(WebInspector.FilterUI.Event
s.FilterChanged, this._textFilterChanged, this); | 388 this._filters._textFilterUI.addEventListener(WebInspector.FilterUI.Event
s.FilterChanged, this._textFilterChanged, this); |
| 392 this._filterBar.addFilter(this._filters._textFilterUI); | 389 this._filterBar.addFilter(this._filters._textFilterUI); |
| 393 | 390 |
| 394 var durationOptions = []; | 391 var durationOptions = []; |
| 395 for (var presetIndex = 0; presetIndex < WebInspector.TimelinePanel.durat
ionFilterPresetsMs.length; ++presetIndex) { | 392 for (var presetIndex = 0; presetIndex < WebInspector.TimelinePanel.durat
ionFilterPresetsMs.length; ++presetIndex) { |
| 396 var durationMs = WebInspector.TimelinePanel.durationFilterPresetsMs[
presetIndex]; | 393 var durationMs = WebInspector.TimelinePanel.durationFilterPresetsMs[
presetIndex]; |
| 397 var durationOption = {}; | 394 var durationOption = {}; |
| 398 if (!durationMs) { | 395 if (!durationMs) { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 this._durationFilter.setMinimumRecordDuration(minimumRecordDuration); | 435 this._durationFilter.setMinimumRecordDuration(minimumRecordDuration); |
| 439 }, | 436 }, |
| 440 | 437 |
| 441 _categoriesFilterChanged: function(name, event) | 438 _categoriesFilterChanged: function(name, event) |
| 442 { | 439 { |
| 443 var categories = WebInspector.TimelineUIUtils.categories(); | 440 var categories = WebInspector.TimelineUIUtils.categories(); |
| 444 categories[name].hidden = !this._filters._categoryFiltersUI[name].checke
d(); | 441 categories[name].hidden = !this._filters._categoryFiltersUI[name].checke
d(); |
| 445 this._categoryFilter.notifyFilterChanged(); | 442 this._categoryFilter.notifyFilterChanged(); |
| 446 }, | 443 }, |
| 447 | 444 |
| 448 _onFiltersToggled: function(event) | |
| 449 { | |
| 450 var toggled = /** @type {boolean} */ (event.data); | |
| 451 this._filtersContainer.classList.toggle("hidden", !toggled); | |
| 452 this.doResize(); | |
| 453 }, | |
| 454 | |
| 455 /** | 445 /** |
| 456 * @return {!WebInspector.Progress} | 446 * @return {!WebInspector.Progress} |
| 457 */ | 447 */ |
| 458 _prepareToLoadTimeline: function() | 448 _prepareToLoadTimeline: function() |
| 459 { | 449 { |
| 460 if (this._recordingInProgress()) { | 450 if (this._recordingInProgress()) { |
| 461 this._updateToggleTimelineButton(false); | 451 this._updateToggleTimelineButton(false); |
| 462 this._stopRecording(); | 452 this._stopRecording(); |
| 463 } | 453 } |
| 464 | 454 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 this._frameOverview.addEventListener(WebInspector.TimelineFrameOverv
iew.Events.SelectionChanged, this._onOverviewSelectionChanged, this); | 601 this._frameOverview.addEventListener(WebInspector.TimelineFrameOverv
iew.Events.SelectionChanged, this._onOverviewSelectionChanged, this); |
| 612 this._overviewControls.push(this._frameOverview); | 602 this._overviewControls.push(this._frameOverview); |
| 613 } else { | 603 } else { |
| 614 this._frameOverview = null; | 604 this._frameOverview = null; |
| 615 this._overviewControls.push(new WebInspector.TimelineEventOverview(t
his._model, this._frameModel())); | 605 this._overviewControls.push(new WebInspector.TimelineEventOverview(t
his._model, this._frameModel())); |
| 616 } | 606 } |
| 617 this.element.classList.toggle("timeline-overview-frames-mode", isFrameMo
de); | 607 this.element.classList.toggle("timeline-overview-frames-mode", isFrameMo
de); |
| 618 | 608 |
| 619 if (this._flameChartEnabledSetting.get()) { | 609 if (this._flameChartEnabledSetting.get()) { |
| 620 this._filterBar.filterButton().setEnabled(false); | 610 this._filterBar.filterButton().setEnabled(false); |
| 621 this._filtersContainer.classList.toggle("hidden", true); | 611 this._filterBar.filtersElement().classList.toggle("hidden", true); |
| 622 this._flameChart = new WebInspector.TimelineFlameChartView(this, thi
s._model, this._frameModel()); | 612 this._flameChart = new WebInspector.TimelineFlameChartView(this, thi
s._model, this._frameModel()); |
| 623 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()
); | 613 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()
); |
| 624 this._addModeView(this._flameChart); | 614 this._addModeView(this._flameChart); |
| 625 } else { | 615 } else { |
| 626 this._flameChart = null; | 616 this._flameChart = null; |
| 627 this._filterBar.filterButton().setEnabled(true); | 617 this._filterBar.filterButton().setEnabled(true); |
| 628 this._filtersContainer.classList.toggle("hidden", !this._filterBar.f
iltersToggled()); | 618 this._filterBar.filtersElement().classList.toggle("hidden", !this._f
ilterBar.filtersToggled()); |
| 629 var timelineView = new WebInspector.TimelineView(this, this._model); | 619 var timelineView = new WebInspector.TimelineView(this, this._model); |
| 630 this._addModeView(timelineView); | 620 this._addModeView(timelineView); |
| 631 timelineView.setFrameModel(isFrameMode ? this._frameModel() : null); | 621 timelineView.setFrameModel(isFrameMode ? this._frameModel() : null); |
| 632 } | 622 } |
| 633 | 623 |
| 634 if (this._captureMemorySetting.get()) { | 624 if (this._captureMemorySetting.get()) { |
| 635 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. | 625 if (!isFrameMode) // Frame mode skews time, don't render aux overvi
ews. |
| 636 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model)); | 626 this._overviewControls.push(new WebInspector.TimelineMemoryOverv
iew(this._model)); |
| 637 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel)); | 627 this._addModeView(new WebInspector.MemoryCountersGraph(this, this._m
odel)); |
| 638 } | 628 } |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1845 /** | 1835 /** |
| 1846 * @override | 1836 * @override |
| 1847 */ | 1837 */ |
| 1848 reset: function() | 1838 reset: function() |
| 1849 { | 1839 { |
| 1850 this._filmStripView.reset(); | 1840 this._filmStripView.reset(); |
| 1851 }, | 1841 }, |
| 1852 | 1842 |
| 1853 __proto__: WebInspector.TimelineOverviewBase.prototype | 1843 __proto__: WebInspector.TimelineOverviewBase.prototype |
| 1854 } | 1844 } |
| OLD | NEW |