| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Create models. | 62 // Create models. |
| 63 this._tracingModelBackingStorage = new Bindings.TempFileBackingStorage('trac
ing'); | 63 this._tracingModelBackingStorage = new Bindings.TempFileBackingStorage('trac
ing'); |
| 64 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); | 64 this._tracingModel = new SDK.TracingModel(this._tracingModelBackingStorage); |
| 65 this._model = new TimelineModel.TimelineModel(Timeline.TimelineUIUtils.visib
leEventsFilter()); | 65 this._model = new TimelineModel.TimelineModel(Timeline.TimelineUIUtils.visib
leEventsFilter()); |
| 66 this._frameModel = | 66 this._frameModel = |
| 67 new TimelineModel.TimelineFrameModel(event => Timeline.TimelineUIUtils.e
ventStyle(event).category.name); | 67 new TimelineModel.TimelineFrameModel(event => Timeline.TimelineUIUtils.e
ventStyle(event).category.name); |
| 68 this._filmStripModel = new Components.FilmStripModel(this._tracingModel); | 68 this._filmStripModel = new Components.FilmStripModel(this._tracingModel); |
| 69 this._irModel = new TimelineModel.TimelineIRModel(); | 69 this._irModel = new TimelineModel.TimelineIRModel(); |
| 70 | 70 /** @type {!Array<!{title: string, model: !SDK.TracingModel}>} */ |
| 71 this._extensionTracingModels = []; |
| 71 this._cpuThrottlingManager = new Timeline.CPUThrottlingManager(); | 72 this._cpuThrottlingManager = new Timeline.CPUThrottlingManager(); |
| 72 | 73 |
| 73 /** @type {!Array.<!Timeline.TimelineModeView>} */ | 74 /** @type {!Array<!Timeline.TimelineModeView>} */ |
| 74 this._currentViews = []; | 75 this._currentViews = []; |
| 75 | 76 |
| 76 this._captureNetworkSetting = Common.settings.createSetting('timelineCapture
Network', false); | 77 this._captureNetworkSetting = Common.settings.createSetting('timelineCapture
Network', false); |
| 77 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); | 78 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); |
| 78 this._captureMemorySetting = Common.settings.createSetting('timelineCaptureM
emory', false); | 79 this._captureMemorySetting = Common.settings.createSetting('timelineCaptureM
emory', false); |
| 79 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); | 80 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); |
| 80 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); | 81 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); |
| 81 | 82 |
| 82 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS',
false); | 83 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS',
false); |
| 83 | 84 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 111 this._searchableView.element.classList.add('searchable-view'); | 112 this._searchableView.element.classList.add('searchable-view'); |
| 112 this._detailsSplitWidget.setMainWidget(this._searchableView); | 113 this._detailsSplitWidget.setMainWidget(this._searchableView); |
| 113 | 114 |
| 114 this._stackView = new UI.StackView(false); | 115 this._stackView = new UI.StackView(false); |
| 115 this._stackView.element.classList.add('timeline-view-stack'); | 116 this._stackView.element.classList.add('timeline-view-stack'); |
| 116 | 117 |
| 117 this._stackView.show(this._searchableView.element); | 118 this._stackView.show(this._searchableView.element); |
| 118 this._onModeChanged(); | 119 this._onModeChanged(); |
| 119 this._recreateToolbarItems(); | 120 this._recreateToolbarItems(); |
| 120 | 121 |
| 122 Extensions.extensionServer.addEventListener( |
| 123 Extensions.ExtensionServer.Events.TraceProviderAdded, this._recreateTool
barItems, this); |
| 124 |
| 121 this._captureNetworkSetting.addChangeListener(this._onNetworkChanged, this); | 125 this._captureNetworkSetting.addChangeListener(this._onNetworkChanged, this); |
| 122 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); | 126 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); |
| 123 this._captureFilmStripSetting.addChangeListener(this._onModeChanged, this); | 127 this._captureFilmStripSetting.addChangeListener(this._onModeChanged, this); |
| 124 | 128 |
| 125 this._detailsSplitWidget.show(this._timelinePane.element); | 129 this._detailsSplitWidget.show(this._timelinePane.element); |
| 126 this._detailsSplitWidget.hideSidebar(); | 130 this._detailsSplitWidget.hideSidebar(); |
| 127 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan
ged, this._onSuspendStateChanged, this); | 131 SDK.targetManager.addEventListener(SDK.TargetManager.Events.SuspendStateChan
ged, this._onSuspendStateChanged, this); |
| 128 this._showRecordingHelpMessage(); | 132 this._showRecordingHelpMessage(); |
| 129 | 133 |
| 130 /** @type {!SDK.TracingModel.Event}|undefined */ | 134 /** @type {!SDK.TracingModel.Event}|undefined */ |
| 131 this._selectedSearchResult; | 135 this._selectedSearchResult; |
| 132 /** @type {!Array<!SDK.TracingModel.Event>}|undefined */ | 136 /** @type {!Array<!SDK.TracingModel.Event>}|undefined */ |
| 133 this._searchResults; | 137 this._searchResults; |
| 138 /** @type {?symbol} */ |
| 139 this._sessionGeneration = null; |
| 140 /** @type {number} */ |
| 141 this._recordingStartTime = 0; |
| 134 } | 142 } |
| 135 | 143 |
| 136 /** | 144 /** |
| 137 * @return {!Timeline.TimelinePanel} | 145 * @return {!Timeline.TimelinePanel} |
| 138 */ | 146 */ |
| 139 static instance() { | 147 static instance() { |
| 140 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T
imeline.TimelinePanel)); | 148 return /** @type {!Timeline.TimelinePanel} */ (self.runtime.sharedInstance(T
imeline.TimelinePanel)); |
| 141 } | 149 } |
| 142 | 150 |
| 143 /** | 151 /** |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 'Capture graphics layer positions and rasterization draw calls. (H
as large performance overhead)'))); | 384 'Capture graphics layer positions and rasterization draw calls. (H
as large performance overhead)'))); |
| 377 } else { | 385 } else { |
| 378 this._panelToolbar.appendToolbarItem(screenshotCheckbox); | 386 this._panelToolbar.appendToolbarItem(screenshotCheckbox); |
| 379 } | 387 } |
| 380 | 388 |
| 381 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording')) { | 389 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording')) { |
| 382 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 390 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
| 383 Common.UIString('CSS coverage'), this._markUnusedCSS, Common.UIString(
'Mark unused CSS in souces.'))); | 391 Common.UIString('CSS coverage'), this._markUnusedCSS, Common.UIString(
'Mark unused CSS in souces.'))); |
| 384 } | 392 } |
| 385 | 393 |
| 394 const traceProviders = Extensions.extensionServer.traceProviders(); |
| 395 if (traceProviders.length) { |
| 396 this._panelToolbar.appendSeparator(); |
| 397 for (let provider of traceProviders) { |
| 398 const setting = Timeline.TimelinePanel._settingForTraceProvider(provider
); |
| 399 const checkbox = this._createSettingCheckbox(provider.shortDisplayName()
, setting, provider.longDisplayName()); |
| 400 this._panelToolbar.appendToolbarItem(checkbox); |
| 401 } |
| 402 } |
| 386 this._panelToolbar.appendSeparator(); | 403 this._panelToolbar.appendSeparator(); |
| 387 this._cpuThrottlingCombobox = new UI.ToolbarComboBox(this._onCPUThrottlingCh
anged.bind(this)); | 404 this._cpuThrottlingCombobox = new UI.ToolbarComboBox(this._onCPUThrottlingCh
anged.bind(this)); |
| 388 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect()); | 405 this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect()); |
| 389 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); | 406 this._panelToolbar.appendToolbarItem(this._cpuThrottlingCombobox); |
| 390 this._populateCPUThrottingCombobox(); | 407 this._populateCPUThrottingCombobox(); |
| 391 this._updateTimelineControls(); | 408 this._updateTimelineControls(); |
| 392 } | 409 } |
| 393 | 410 |
| 394 /** | 411 /** |
| 412 * @param {!Extensions.ExtensionTraceProvider} traceProvider |
| 413 * @return {!Common.Setting<boolean>} |
| 414 */ |
| 415 static _settingForTraceProvider(traceProvider) { |
| 416 var setting = traceProvider[Timeline.TimelinePanel._traceProviderSettingSymb
ol]; |
| 417 if (!setting) { |
| 418 var providerId = traceProvider.persistentIdentifier(); |
| 419 setting = Common.settings.createSetting(providerId, false); |
| 420 traceProvider[Timeline.TimelinePanel._traceProviderSettingSymbol] = settin
g; |
| 421 } |
| 422 return setting; |
| 423 } |
| 424 |
| 425 /** |
| 395 * @return {!UI.ToolbarComboBox} | 426 * @return {!UI.ToolbarComboBox} |
| 396 */ | 427 */ |
| 397 _createNetworkConditionsSelect() { | 428 _createNetworkConditionsSelect() { |
| 398 var toolbarItem = new UI.ToolbarComboBox(null); | 429 var toolbarItem = new UI.ToolbarComboBox(null); |
| 399 toolbarItem.setMaxWidth(140); | 430 toolbarItem.setMaxWidth(140); |
| 400 Components.NetworkConditionsSelector.decorateSelect(toolbarItem.selectElemen
t()); | 431 Components.NetworkConditionsSelector.decorateSelect(toolbarItem.selectElemen
t()); |
| 401 return toolbarItem; | 432 return toolbarItem; |
| 402 } | 433 } |
| 403 | 434 |
| 404 _populateCPUThrottingCombobox() { | 435 _populateCPUThrottingCombobox() { |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 this._overviewControls.push(new Timeline.TimelineEventOverviewCPUActivity(th
is._model)); | 551 this._overviewControls.push(new Timeline.TimelineEventOverviewCPUActivity(th
is._model)); |
| 521 this._overviewControls.push(new Timeline.TimelineEventOverviewNetwork(this._
model)); | 552 this._overviewControls.push(new Timeline.TimelineEventOverviewNetwork(this._
model)); |
| 522 if (this._captureFilmStripSetting.get()) | 553 if (this._captureFilmStripSetting.get()) |
| 523 this._overviewControls.push(new Timeline.TimelineFilmStripOverview(this._m
odel, this._filmStripModel)); | 554 this._overviewControls.push(new Timeline.TimelineFilmStripOverview(this._m
odel, this._filmStripModel)); |
| 524 if (this._captureMemorySetting.get()) | 555 if (this._captureMemorySetting.get()) |
| 525 this._overviewControls.push(new Timeline.TimelineEventOverviewMemory(this.
_model)); | 556 this._overviewControls.push(new Timeline.TimelineEventOverviewMemory(this.
_model)); |
| 526 this._overviewPane.setOverviewControls(this._overviewControls); | 557 this._overviewPane.setOverviewControls(this._overviewControls); |
| 527 | 558 |
| 528 // Set up the main view. | 559 // Set up the main view. |
| 529 this._removeAllModeViews(); | 560 this._removeAllModeViews(); |
| 530 this._flameChart = | 561 this._flameChart = new Timeline.TimelineFlameChartView( |
| 531 new Timeline.TimelineFlameChartView(this, this._model, this._frameModel,
this._irModel, this._filters); | 562 this, this._model, this._frameModel, this._irModel, this._extensionTraci
ngModels, this._filters); |
| 532 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()); | 563 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()); |
| 533 this._addModeView(this._flameChart); | 564 this._addModeView(this._flameChart); |
| 534 | 565 |
| 535 if (this._captureMemorySetting.get()) { | 566 if (this._captureMemorySetting.get()) { |
| 536 this._addModeView( | 567 this._addModeView( |
| 537 new Timeline.MemoryCountersGraph(this, this._model, [Timeline.Timeline
UIUtils.visibleEventsFilter()])); | 568 new Timeline.MemoryCountersGraph(this, this._model, [Timeline.Timeline
UIUtils.visibleEventsFilter()])); |
| 538 } | 569 } |
| 539 | 570 |
| 540 this.doResize(); | 571 this.doResize(); |
| 541 this.select(null); | 572 this.select(null); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 console.assert(!this._statusPane, 'Status pane is already opened.'); | 604 console.assert(!this._statusPane, 'Status pane is already opened.'); |
| 574 var mainTarget = SDK.targetManager.mainTarget(); | 605 var mainTarget = SDK.targetManager.mainTarget(); |
| 575 if (!mainTarget) | 606 if (!mainTarget) |
| 576 return; | 607 return; |
| 577 this._setState(Timeline.TimelinePanel.State.StartPending); | 608 this._setState(Timeline.TimelinePanel.State.StartPending); |
| 578 this._showRecordingStarted(); | 609 this._showRecordingStarted(); |
| 579 | 610 |
| 580 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) | 611 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) |
| 581 SDK.CSSModel.fromTarget(mainTarget).startRuleUsageTracking(); | 612 SDK.CSSModel.fromTarget(mainTarget).startRuleUsageTracking(); |
| 582 | 613 |
| 614 this._sessionGeneration = Symbol('timelineSessionGeneration'); |
| 583 this._autoRecordGeneration = userInitiated ? null : Symbol('Generation'); | 615 this._autoRecordGeneration = userInitiated ? null : Symbol('Generation'); |
| 616 var enabledTraceProviders = Extensions.extensionServer.traceProviders().filt
er( |
| 617 provider => Timeline.TimelinePanel._settingForTraceProvider(provider).ge
t()); |
| 618 |
| 619 var captureOptions = { |
| 620 captureCauses: true, |
| 621 enableJSSampling: this._captureJSProfileSetting.get(), |
| 622 captureMemory: this._captureMemorySetting.get(), |
| 623 capturePictures: this._captureLayersAndPicturesSetting.get(), |
| 624 captureFilmStrip: this._captureFilmStripSetting.get() |
| 625 }; |
| 626 |
| 584 this._controller = new Timeline.TimelineController(mainTarget, this, this._t
racingModel); | 627 this._controller = new Timeline.TimelineController(mainTarget, this, this._t
racingModel); |
| 585 this._controller.startRecording( | 628 this._controller.startRecording(captureOptions, enabledTraceProviders); |
| 586 true, this._captureJSProfileSetting.get(), this._captureMemorySetting.ge
t(), | 629 this._recordingStartTime = Date.now(); |
| 587 this._captureLayersAndPicturesSetting.get(), | |
| 588 this._captureFilmStripSetting && this._captureFilmStripSetting.get()); | |
| 589 | 630 |
| 590 for (var i = 0; i < this._overviewControls.length; ++i) | 631 for (var i = 0; i < this._overviewControls.length; ++i) |
| 591 this._overviewControls[i].timelineStarted(); | 632 this._overviewControls[i].timelineStarted(); |
| 592 | 633 |
| 593 if (userInitiated) | 634 if (userInitiated) |
| 594 Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelineStarted); | 635 Host.userMetrics.actionTaken(Host.UserMetrics.Action.TimelineStarted); |
| 595 this._setUIControlsEnabled(false); | 636 this._setUIControlsEnabled(false); |
| 596 this._hideRecordingHelpMessage(); | 637 this._hideRecordingHelpMessage(); |
| 597 } | 638 } |
| 598 | 639 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 624 _toggleRecording() { | 665 _toggleRecording() { |
| 625 if (this._state === Timeline.TimelinePanel.State.Idle) | 666 if (this._state === Timeline.TimelinePanel.State.Idle) |
| 626 this._startRecording(true); | 667 this._startRecording(true); |
| 627 else if (this._state === Timeline.TimelinePanel.State.Recording) | 668 else if (this._state === Timeline.TimelinePanel.State.Recording) |
| 628 this._stopRecording(); | 669 this._stopRecording(); |
| 629 } | 670 } |
| 630 | 671 |
| 631 _clear() { | 672 _clear() { |
| 632 this._showRecordingHelpMessage(); | 673 this._showRecordingHelpMessage(); |
| 633 this._detailsSplitWidget.hideSidebar(); | 674 this._detailsSplitWidget.hideSidebar(); |
| 675 this._sessionGeneration = null; |
| 676 this._recordingStartTime = 0; |
| 634 this._reset(); | 677 this._reset(); |
| 635 } | 678 } |
| 636 | 679 |
| 637 _reset() { | 680 _reset() { |
| 638 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) | 681 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) |
| 639 Components.CoverageProfile.instance().reset(); | 682 Components.CoverageProfile.instance().reset(); |
| 640 | 683 |
| 641 Components.LineLevelProfile.instance().reset(); | 684 Components.LineLevelProfile.instance().reset(); |
| 642 this._tracingModel.reset(); | 685 this._tracingModel.reset(); |
| 643 this._model.reset(); | 686 this._model.reset(); |
| 687 for (let extensionEntry of this._extensionTracingModels) |
| 688 extensionEntry.model.reset(); |
| 689 this._extensionTracingModels.splice(0); |
| 644 | 690 |
| 645 this.requestWindowTimes(0, Infinity); | 691 this.requestWindowTimes(0, Infinity); |
| 646 delete this._selection; | 692 delete this._selection; |
| 647 this._frameModel.reset(); | 693 this._frameModel.reset(); |
| 648 this._filmStripModel.reset(this._tracingModel); | 694 this._filmStripModel.reset(this._tracingModel); |
| 649 this._overviewPane.reset(); | 695 this._overviewPane.reset(); |
| 650 this._currentViews.forEach(view => view.reset()); | 696 this._currentViews.forEach(view => view.reset()); |
| 651 this._overviewControls.forEach(overview => overview.reset()); | 697 this._overviewControls.forEach(overview => overview.reset()); |
| 652 this.select(null); | 698 this.select(null); |
| 653 } | 699 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 666 } | 712 } |
| 667 | 713 |
| 668 /** | 714 /** |
| 669 * @override | 715 * @override |
| 670 * @param {number} usage | 716 * @param {number} usage |
| 671 */ | 717 */ |
| 672 recordingProgress(usage) { | 718 recordingProgress(usage) { |
| 673 this._statusPane.updateProgressBar(Common.UIString('Buffer usage'), usage *
100); | 719 this._statusPane.updateProgressBar(Common.UIString('Buffer usage'), usage *
100); |
| 674 } | 720 } |
| 675 | 721 |
| 722 /** |
| 723 * @override |
| 724 * @param {string} title |
| 725 * @param {!SDK.TracingModel} tracingModel |
| 726 * @param {number} timeOffset |
| 727 */ |
| 728 addExtensionEvents(title, tracingModel, timeOffset) { |
| 729 this._extensionTracingModels.push({title: title, model: tracingModel, timeOf
fset: timeOffset}); |
| 730 if (this._state !== Timeline.TimelinePanel.State.Idle) |
| 731 return; |
| 732 tracingModel.adjustTime(this._model.minimumRecordTime() + (timeOffset / 1000
) - this._recordingStartTime); |
| 733 for (let view of this._currentViews) |
| 734 view.extensionDataAdded(); |
| 735 } |
| 736 |
| 737 /** |
| 738 * @override |
| 739 * @return {?symbol} |
| 740 */ |
| 741 sessionGeneration() { |
| 742 return this._sessionGeneration; |
| 743 } |
| 744 |
| 676 _showRecordingHelpMessage() { | 745 _showRecordingHelpMessage() { |
| 677 if (Runtime.experiments.isEnabled('timelineLandingPage')) { | 746 if (Runtime.experiments.isEnabled('timelineLandingPage')) { |
| 678 this._showLandingPage(); | 747 this._showLandingPage(); |
| 679 return; | 748 return; |
| 680 } | 749 } |
| 681 | 750 |
| 682 /** | 751 /** |
| 683 * @param {string} tagName | 752 * @param {string} tagName |
| 684 * @param {string} contents | 753 * @param {string} contents |
| 685 * @return {!Element} | 754 * @return {!Element} |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 this._frameModel.addTraceEvents( | 856 this._frameModel.addTraceEvents( |
| 788 SDK.targetManager.mainTarget(), this._model.inspectedTargetEvents(), thi
s._model.sessionId() || ''); | 857 SDK.targetManager.mainTarget(), this._model.inspectedTargetEvents(), thi
s._model.sessionId() || ''); |
| 789 this._filmStripModel.reset(this._tracingModel); | 858 this._filmStripModel.reset(this._tracingModel); |
| 790 var groups = TimelineModel.TimelineModel.AsyncEventGroup; | 859 var groups = TimelineModel.TimelineModel.AsyncEventGroup; |
| 791 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); | 860 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); |
| 792 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEventsByGr
oup.get(groups.animation)); | 861 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEventsByGr
oup.get(groups.animation)); |
| 793 this._model.cpuProfiles().forEach(profile => Components.LineLevelProfile.ins
tance().appendCPUProfile(profile)); | 862 this._model.cpuProfiles().forEach(profile => Components.LineLevelProfile.ins
tance().appendCPUProfile(profile)); |
| 794 if (this._statusPane) | 863 if (this._statusPane) |
| 795 this._statusPane.hide(); | 864 this._statusPane.hide(); |
| 796 delete this._statusPane; | 865 delete this._statusPane; |
| 866 |
| 867 for (let entry of this._extensionTracingModels) |
| 868 entry.model.adjustTime(this._model.minimumRecordTime() + (entry.timeOffset
/ 1000) - this._recordingStartTime); |
| 869 |
| 797 this._flameChart.resizeToPreferredHeights(); | 870 this._flameChart.resizeToPreferredHeights(); |
| 798 this._overviewPane.reset(); | 871 this._overviewPane.reset(); |
| 799 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._model.ma
ximumRecordTime()); | 872 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._model.ma
ximumRecordTime()); |
| 800 this._setAutoWindowTimes(); | 873 this._setAutoWindowTimes(); |
| 801 this._refreshViews(); | 874 this._refreshViews(); |
| 802 for (var i = 0; i < this._overviewControls.length; ++i) | 875 for (var i = 0; i < this._overviewControls.length; ++i) |
| 803 this._overviewControls[i].timelineStopped(); | 876 this._overviewControls[i].timelineStopped(); |
| 804 this._setMarkers(); | 877 this._setMarkers(); |
| 805 this._overviewPane.scheduleUpdate(); | 878 this._overviewPane.scheduleUpdate(); |
| 806 this._updateSearchHighlight(false, true); | 879 this._updateSearchHighlight(false, true); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 Loading: Symbol('Loading') | 1362 Loading: Symbol('Loading') |
| 1290 }; | 1363 }; |
| 1291 | 1364 |
| 1292 // Define row and header height, should be in sync with styles for timeline grap
hs. | 1365 // Define row and header height, should be in sync with styles for timeline grap
hs. |
| 1293 Timeline.TimelinePanel.rowHeight = 18; | 1366 Timeline.TimelinePanel.rowHeight = 18; |
| 1294 Timeline.TimelinePanel.headerHeight = 20; | 1367 Timeline.TimelinePanel.headerHeight = 20; |
| 1295 | 1368 |
| 1296 /** | 1369 /** |
| 1297 * @interface | 1370 * @interface |
| 1298 */ | 1371 */ |
| 1372 Timeline.LoaderClient = function() {} |
| 1373 |
| 1374 Timeline.LoaderClient.prototype = { |
| 1375 loadingStarted() {}, |
| 1376 |
| 1377 /** |
| 1378 * @param {number=} progress |
| 1379 */ |
| 1380 loadingProgress(progress) {}, |
| 1381 |
| 1382 /** |
| 1383 * @param {boolean} success |
| 1384 */ |
| 1385 loadingComplete(success) {}, |
| 1386 } |
| 1387 |
| 1388 /** |
| 1389 * @interface |
| 1390 * @extends {Timeline.LoaderClient} |
| 1391 */ |
| 1299 Timeline.TimelineLifecycleDelegate = function() {}; | 1392 Timeline.TimelineLifecycleDelegate = function() {}; |
| 1300 | 1393 |
| 1301 Timeline.TimelineLifecycleDelegate.prototype = { | 1394 Timeline.TimelineLifecycleDelegate.prototype = { |
| 1302 recordingStarted() {}, | 1395 recordingStarted() {}, |
| 1303 | 1396 |
| 1304 /** | 1397 /** |
| 1305 * @param {number} usage | 1398 * @param {number} usage |
| 1306 */ | 1399 */ |
| 1307 recordingProgress(usage) {}, | 1400 recordingProgress(usage) {}, |
| 1308 | 1401 |
| 1309 loadingStarted() {}, | 1402 /** |
| 1403 * @param {string} title |
| 1404 * @param {!SDK.TracingModel} tracingModel |
| 1405 * @param {number} timeOffset |
| 1406 */ |
| 1407 addExtensionEvents(title, tracingModel, timeOffset) {}, |
| 1310 | 1408 |
| 1311 /** | 1409 /** @return {?symbol} */ |
| 1312 * @param {number=} progress | 1410 sessionGeneration() {} |
| 1313 */ | |
| 1314 loadingProgress(progress) {}, | |
| 1315 | |
| 1316 /** | |
| 1317 * @param {boolean} success | |
| 1318 */ | |
| 1319 loadingComplete(success) {}, | |
| 1320 }; | 1411 }; |
| 1321 | 1412 |
| 1322 /** | 1413 /** |
| 1323 * @unrestricted | 1414 * @unrestricted |
| 1324 */ | 1415 */ |
| 1325 Timeline.TimelineDetailsView = class extends UI.TabbedPane { | 1416 Timeline.TimelineDetailsView = class extends UI.TabbedPane { |
| 1326 /** | 1417 /** |
| 1327 * @param {!TimelineModel.TimelineModel} timelineModel | 1418 * @param {!TimelineModel.TimelineModel} timelineModel |
| 1328 * @param {!Array<!TimelineModel.TimelineModel.Filter>} filters | 1419 * @param {!Array<!TimelineModel.TimelineModel.Filter>} filters |
| 1329 * @param {!Timeline.TimelineModeViewDelegate} delegate | 1420 * @param {!Timeline.TimelineModeViewDelegate} delegate |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 | 1614 |
| 1524 /** | 1615 /** |
| 1525 * @return {?Element} | 1616 * @return {?Element} |
| 1526 */ | 1617 */ |
| 1527 resizerElement() {}, | 1618 resizerElement() {}, |
| 1528 | 1619 |
| 1529 reset() {}, | 1620 reset() {}, |
| 1530 | 1621 |
| 1531 refreshRecords() {}, | 1622 refreshRecords() {}, |
| 1532 | 1623 |
| 1624 extensionDataAdded() {}, |
| 1625 |
| 1533 /** | 1626 /** |
| 1534 * @param {?SDK.TracingModel.Event} event | 1627 * @param {?SDK.TracingModel.Event} event |
| 1535 * @param {string=} regex | 1628 * @param {string=} regex |
| 1536 * @param {boolean=} select | 1629 * @param {boolean=} select |
| 1537 */ | 1630 */ |
| 1538 highlightSearchResult(event, regex, select) {}, | 1631 highlightSearchResult(event, regex, select) {}, |
| 1539 | 1632 |
| 1540 /** | 1633 /** |
| 1541 * @param {number} startTime | 1634 * @param {number} startTime |
| 1542 * @param {number} endTime | 1635 * @param {number} endTime |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1912 categories[name].hidden = !categoryFiltersUI[name].checked(); | 2005 categories[name].hidden = !categoryFiltersUI[name].checked(); |
| 1913 this._notifyFiltersChanged(); | 2006 this._notifyFiltersChanged(); |
| 1914 } | 2007 } |
| 1915 } | 2008 } |
| 1916 | 2009 |
| 1917 _notifyFiltersChanged() { | 2010 _notifyFiltersChanged() { |
| 1918 this.dispatchEventToListeners(Timeline.TimelineFilters.Events.FilterChanged)
; | 2011 this.dispatchEventToListeners(Timeline.TimelineFilters.Events.FilterChanged)
; |
| 1919 } | 2012 } |
| 1920 }; | 2013 }; |
| 1921 | 2014 |
| 2015 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); |
| 2016 |
| 1922 /** @enum {symbol} */ | 2017 /** @enum {symbol} */ |
| 1923 Timeline.TimelineFilters.Events = { | 2018 Timeline.TimelineFilters.Events = { |
| 1924 FilterChanged: Symbol('FilterChanged') | 2019 FilterChanged: Symbol('FilterChanged') |
| 1925 }; | 2020 }; |
| 1926 | 2021 |
| 1927 Timeline.TimelineFilters._durationFilterPresetsMs = [0, 1, 15]; | 2022 Timeline.TimelineFilters._durationFilterPresetsMs = [0, 1, 15]; |
| 1928 | 2023 |
| 1929 /** | 2024 /** |
| 1930 * @implements {SDK.TargetManager.Observer} | 2025 * @implements {SDK.TargetManager.Observer} |
| 1931 * @unrestricted | 2026 * @unrestricted |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1967 } | 2062 } |
| 1968 | 2063 |
| 1969 /** | 2064 /** |
| 1970 * @override | 2065 * @override |
| 1971 * @param {!SDK.Target} target | 2066 * @param {!SDK.Target} target |
| 1972 */ | 2067 */ |
| 1973 targetRemoved(target) { | 2068 targetRemoved(target) { |
| 1974 this._targets.remove(target, true); | 2069 this._targets.remove(target, true); |
| 1975 } | 2070 } |
| 1976 }; | 2071 }; |
| OLD | NEW |