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 26 matching lines...) Expand all Loading... |
37 */ | 37 */ |
38 Timeline.TimelinePanel = class extends UI.Panel { | 38 Timeline.TimelinePanel = class extends UI.Panel { |
39 constructor() { | 39 constructor() { |
40 super('timeline'); | 40 super('timeline'); |
41 this.registerRequiredCSS('timeline/timelinePanel.css'); | 41 this.registerRequiredCSS('timeline/timelinePanel.css'); |
42 this.element.addEventListener('contextmenu', this._contextMenu.bind(this), f
alse); | 42 this.element.addEventListener('contextmenu', this._contextMenu.bind(this), f
alse); |
43 this._dropTarget = new UI.DropTarget( | 43 this._dropTarget = new UI.DropTarget( |
44 this.element, [UI.DropTarget.Types.Files, UI.DropTarget.Types.URIList], | 44 this.element, [UI.DropTarget.Types.Files, UI.DropTarget.Types.URIList], |
45 Common.UIString('Drop timeline file or URL here'), this._handleDrop.bind
(this)); | 45 Common.UIString('Drop timeline file or URL here'), this._handleDrop.bind
(this)); |
46 | 46 |
| 47 /** @type {!Array<!UI.ToolbarItem>} */ |
| 48 this._recordingOptionUIControls = []; |
47 this._state = Timeline.TimelinePanel.State.Idle; | 49 this._state = Timeline.TimelinePanel.State.Idle; |
48 this._detailsLinkifier = new Components.Linkifier(); | 50 this._detailsLinkifier = new Components.Linkifier(); |
49 this._windowStartTime = 0; | 51 this._windowStartTime = 0; |
50 this._windowEndTime = Infinity; | 52 this._windowEndTime = Infinity; |
51 this._millisecondsToRecordAfterLoadEvent = 3000; | 53 this._millisecondsToRecordAfterLoadEvent = 3000; |
52 this._toggleRecordAction = | 54 this._toggleRecordAction = |
53 /** @type {!UI.Action }*/ (UI.actionRegistry.action('timeline.toggle-rec
ording')); | 55 /** @type {!UI.Action }*/ (UI.actionRegistry.action('timeline.toggle-rec
ording')); |
54 | 56 |
55 /** @type {!Array<!TimelineModel.TimelineModel.Filter>} */ | 57 /** @type {!Array<!TimelineModel.TimelineModel.Filter>} */ |
56 this._filters = []; | 58 this._filters = []; |
(...skipping 16 matching lines...) Expand all Loading... |
73 | 75 |
74 /** @type {!Array<!Timeline.TimelineModeView>} */ | 76 /** @type {!Array<!Timeline.TimelineModeView>} */ |
75 this._currentViews = []; | 77 this._currentViews = []; |
76 | 78 |
77 this._captureNetworkSetting = Common.settings.createSetting('timelineCapture
Network', false); | 79 this._captureNetworkSetting = Common.settings.createSetting('timelineCapture
Network', false); |
78 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); | 80 this._captureJSProfileSetting = Common.settings.createSetting('timelineEnabl
eJSSampling', true); |
79 this._captureMemorySetting = Common.settings.createSetting('timelineCaptureM
emory', false); | 81 this._captureMemorySetting = Common.settings.createSetting('timelineCaptureM
emory', false); |
80 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); | 82 this._captureLayersAndPicturesSetting = Common.settings.createSetting('timel
ineCaptureLayersAndPictures', false); |
81 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); | 83 this._captureFilmStripSetting = Common.settings.createSetting('timelineCaptu
reFilmStrip', false); |
82 | 84 |
| 85 this._showScreenshotsSetting = Common.settings.createLocalSetting('timelineS
howScreenshots', false); |
| 86 this._showScreenshotsSetting.addChangeListener(this._onModeChanged, this); |
| 87 this._showMemorySetting = Common.settings.createLocalSetting('timelineShowMe
mory', false); |
| 88 this._showMemorySetting.addChangeListener(this._onModeChanged, this); |
| 89 |
83 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS',
false); | 90 this._markUnusedCSS = Common.settings.createSetting('timelineMarkUnusedCSS',
false); |
84 | 91 |
85 this._panelToolbar = new UI.Toolbar('', this.element); | 92 this._panelToolbar = new UI.Toolbar('', this.element); |
86 | 93 |
87 this._timelinePane = new UI.VBox(); | 94 this._timelinePane = new UI.VBox(); |
88 this._timelinePane.show(this.element); | 95 this._timelinePane.show(this.element); |
89 var topPaneElement = this._timelinePane.element.createChild('div', 'hbox'); | 96 var topPaneElement = this._timelinePane.element.createChild('div', 'hbox'); |
90 topPaneElement.id = 'timeline-overview-panel'; | 97 topPaneElement.id = 'timeline-overview-panel'; |
91 | 98 |
92 // Create top overview component. | 99 // Create top overview component. |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 this._updateTimelineControls(); | 273 this._updateTimelineControls(); |
267 } | 274 } |
268 | 275 |
269 /** | 276 /** |
270 * @param {string} name | 277 * @param {string} name |
271 * @param {!Common.Setting} setting | 278 * @param {!Common.Setting} setting |
272 * @param {string} tooltip | 279 * @param {string} tooltip |
273 * @return {!UI.ToolbarItem} | 280 * @return {!UI.ToolbarItem} |
274 */ | 281 */ |
275 _createSettingCheckbox(name, setting, tooltip) { | 282 _createSettingCheckbox(name, setting, tooltip) { |
276 if (!this._recordingOptionUIControls) | 283 const checkboxItem = new UI.ToolbarCheckbox(name, tooltip, setting); |
277 this._recordingOptionUIControls = []; | |
278 var checkboxItem = new UI.ToolbarCheckbox(name, tooltip, setting); | |
279 this._recordingOptionUIControls.push(checkboxItem); | 284 this._recordingOptionUIControls.push(checkboxItem); |
280 return checkboxItem; | 285 return checkboxItem; |
281 } | 286 } |
282 | 287 |
283 _recreateToolbarItems() { | 288 _recreateToolbarItems() { |
284 this._panelToolbar.removeToolbarItems(); | 289 this._panelToolbar.removeToolbarItems(); |
285 | 290 |
286 var perspectiveSetting = | 291 const perspectiveSetting = |
287 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa
nel.Perspectives.Load); | 292 Common.settings.createSetting('timelinePerspective', Timeline.TimelinePa
nel.Perspectives.Load); |
288 | 293 |
289 // Record | 294 // Record |
290 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') && | 295 if (Runtime.experiments.isEnabled('timelineLandingPage')) { |
| 296 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t
oggleRecordAction)); |
| 297 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('m
ain.reload')); |
| 298 } else if (Runtime.experiments.isEnabled('timelineRecordingPerspectives') && |
291 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) { | 299 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Load) { |
292 this._reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload
'), 'largeicon-refresh'); | 300 const reloadButton = new UI.ToolbarButton(Common.UIString('Record & Reload
'), 'largeicon-refresh'); |
293 this._reloadButton.addEventListener(UI.ToolbarButton.Events.Click, () => S
DK.targetManager.reloadPage()); | 301 reloadButton.addEventListener(UI.ToolbarButton.Events.Click, () => SDK.tar
getManager.reloadPage()); |
294 this._panelToolbar.appendToolbarItem(this._reloadButton); | 302 this._panelToolbar.appendToolbarItem(reloadButton); |
295 } else { | 303 } else { |
296 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t
oggleRecordAction)); | 304 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._t
oggleRecordAction)); |
297 } | 305 } |
298 | 306 |
299 // Clear | 307 // Clear |
300 var clearButton = new UI.ToolbarButton(Common.UIString('Clear recording'), '
largeicon-clear'); | 308 var clearButton = new UI.ToolbarButton(Common.UIString('Clear recording'), '
largeicon-clear'); |
301 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, thi
s); | 309 clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._clear, thi
s); |
302 this._panelToolbar.appendToolbarItem(clearButton); | 310 this._panelToolbar.appendToolbarItem(clearButton); |
303 | 311 |
304 this._panelToolbar.appendSeparator(); | 312 this._panelToolbar.appendSeparator(); |
305 | 313 |
306 // Combo | 314 // Combo |
307 if (Runtime.experiments.isEnabled('timelineRecordingPerspectives')) { | 315 if (!Runtime.experiments.isEnabled('timelineLandingPage') && |
| 316 Runtime.experiments.isEnabled('timelineRecordingPerspectives')) { |
308 /** | 317 /** |
309 * @this {!Timeline.TimelinePanel} | 318 * @this {!Timeline.TimelinePanel} |
310 */ | 319 */ |
311 function onPerspectiveChanged() { | 320 function onPerspectiveChanged() { |
312 perspectiveSetting.set(perspectiveCombobox.selectElement().value); | 321 perspectiveSetting.set(perspectiveCombobox.selectElement().value); |
313 this._recreateToolbarItems(); | 322 this._recreateToolbarItems(); |
314 } | 323 } |
315 | 324 |
316 /** | 325 /** |
317 * @param {string} id | 326 * @param {string} id |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 this._captureLayersAndPicturesSetting.set(false); | 364 this._captureLayersAndPicturesSetting.set(false); |
356 this._captureFilmStripSetting.set(false); | 365 this._captureFilmStripSetting.set(false); |
357 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.BottomUp
, false); | 366 this._detailsView.selectTab(Timeline.TimelinePanel.DetailsTab.BottomUp
, false); |
358 break; | 367 break; |
359 } | 368 } |
360 | 369 |
361 this._bulkUpdate = false; | 370 this._bulkUpdate = false; |
362 this._onModeChanged(); | 371 this._onModeChanged(); |
363 } | 372 } |
364 | 373 |
365 var screenshotCheckbox = this._createSettingCheckbox( | 374 if (Runtime.experiments.isEnabled('timelineLandingPage')) { |
366 Common.UIString('Screenshots'), this._captureFilmStripSetting, | 375 if (!this._model.isEmpty()) { |
367 Common.UIString('Capture screenshots while recording. (Has small perform
ance overhead)')); | 376 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Common.
UIString('Memory'), |
| 377 this._showMemorySetting, Common.UIString('Show memory timeline.'))); |
| 378 if (this._filmStripModel.frames().length) { |
| 379 this._showScreenshotsSetting.set(true); |
| 380 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox(Commo
n.UIString('Screenshots'), |
| 381 this._showScreenshotsSetting, Common.UIString('Show captured scree
nshots.'))); |
| 382 } |
| 383 } |
| 384 } else { |
| 385 const screenshotCheckbox = this._createSettingCheckbox( |
| 386 Common.UIString('Screenshots'), this._captureFilmStripSetting, |
| 387 Common.UIString('Capture screenshots while recording. (Has small perfo
rmance overhead)')); |
368 | 388 |
369 if (!Runtime.experiments.isEnabled('timelineRecordingPerspectives') || | 389 if (!Runtime.experiments.isEnabled('timelineRecordingPerspectives') || |
370 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Custom)
{ | 390 perspectiveSetting.get() === Timeline.TimelinePanel.Perspectives.Custo
m) { |
371 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 391 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
372 Common.UIString('Network'), this._captureNetworkSetting, | 392 Common.UIString('Network'), this._captureNetworkSetting, |
373 Common.UIString('Show network requests information'))); | 393 Common.UIString('Show network requests information'))); |
374 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 394 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
375 Common.UIString('JS Profile'), this._captureJSProfileSetting, | 395 Common.UIString('JS Profile'), this._captureJSProfileSetting, |
376 Common.UIString('Capture JavaScript stacks with sampling profiler. (Ha
s small performance overhead)'))); | 396 Common.UIString('Capture JavaScript stacks with sampling profiler. (
Has small performance overhead)'))); |
377 this._panelToolbar.appendToolbarItem(screenshotCheckbox); | 397 this._panelToolbar.appendToolbarItem(screenshotCheckbox); |
378 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 398 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
379 Common.UIString('Memory'), this._captureMemorySetting, | 399 Common.UIString('Memory'), this._captureMemorySetting, |
380 Common.UIString('Capture memory information on every timeline event.')
)); | 400 Common.UIString('Capture memory information on every timeline event.
'))); |
381 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 401 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
382 Common.UIString('Paint'), this._captureLayersAndPicturesSetting, | 402 Common.UIString('Paint'), this._captureLayersAndPicturesSetting, |
383 Common.UIString( | 403 Common.UIString( |
384 'Capture graphics layer positions and rasterization draw calls. (H
as large performance overhead)'))); | 404 'Capture graphics layer positions and rasterization draw calls.
(Has large performance overhead)'))); |
385 } else { | 405 } else { |
386 this._panelToolbar.appendToolbarItem(screenshotCheckbox); | 406 this._panelToolbar.appendToolbarItem(screenshotCheckbox); |
| 407 } |
387 } | 408 } |
388 | 409 |
389 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording')) { | 410 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording')) { |
390 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( | 411 this._panelToolbar.appendToolbarItem(this._createSettingCheckbox( |
391 Common.UIString('CSS coverage'), this._markUnusedCSS, Common.UIString(
'Mark unused CSS in souces.'))); | 412 Common.UIString('CSS coverage'), this._markUnusedCSS, Common.UIString(
'Mark unused CSS in souces.'))); |
392 } | 413 } |
393 | 414 |
394 const traceProviders = Extensions.extensionServer.traceProviders(); | 415 const traceProviders = Extensions.extensionServer.traceProviders(); |
395 if (traceProviders.length) { | 416 if (traceProviders.length) { |
396 this._panelToolbar.appendSeparator(); | 417 this._panelToolbar.appendSeparator(); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 * @param {string} url | 549 * @param {string} url |
529 */ | 550 */ |
530 _loadFromURL(url) { | 551 _loadFromURL(url) { |
531 if (this._state !== Timeline.TimelinePanel.State.Idle) | 552 if (this._state !== Timeline.TimelinePanel.State.Idle) |
532 return; | 553 return; |
533 this._prepareToLoadTimeline(); | 554 this._prepareToLoadTimeline(); |
534 this._loader = Timeline.TimelineLoader.loadFromURL(this._tracingModel, url,
this); | 555 this._loader = Timeline.TimelineLoader.loadFromURL(this._tracingModel, url,
this); |
535 } | 556 } |
536 | 557 |
537 _refreshViews() { | 558 _refreshViews() { |
538 for (var i = 0; i < this._currentViews.length; ++i) { | 559 this._currentViews.forEach(view => view.refreshRecords()); |
539 var view = this._currentViews[i]; | |
540 view.refreshRecords(); | |
541 } | |
542 this._updateSelectionDetails(); | 560 this._updateSelectionDetails(); |
543 } | 561 } |
544 | 562 |
545 _onModeChanged() { | 563 _onModeChanged() { |
546 if (this._bulkUpdate) | 564 if (this._bulkUpdate) |
547 return; | 565 return; |
| 566 const showMemory = Runtime.experiments.isEnabled('timelineLandingPage') |
| 567 ? this._showMemorySetting.get() : this._captureMemorySetting.get(); |
| 568 const showScreenshots = Runtime.experiments.isEnabled('timelineLandingPage') |
| 569 ? this._showScreenshotsSetting.get() && this._filmStripModel.frames().le
ngth |
| 570 : this._captureFilmStripSetting.get(); |
548 // Set up overview controls. | 571 // Set up overview controls. |
549 this._overviewControls = []; | 572 this._overviewControls = []; |
550 this._overviewControls.push(new Timeline.TimelineEventOverviewResponsiveness
(this._model, this._frameModel)); | 573 this._overviewControls.push(new Timeline.TimelineEventOverviewResponsiveness
(this._model, this._frameModel)); |
551 if (Runtime.experiments.isEnabled('inputEventsOnTimelineOverview')) | 574 if (Runtime.experiments.isEnabled('inputEventsOnTimelineOverview')) |
552 this._overviewControls.push(new Timeline.TimelineEventOverviewInput(this._
model)); | 575 this._overviewControls.push(new Timeline.TimelineEventOverviewInput(this._
model)); |
553 this._overviewControls.push(new Timeline.TimelineEventOverviewFrames(this._m
odel, this._frameModel)); | 576 this._overviewControls.push(new Timeline.TimelineEventOverviewFrames(this._m
odel, this._frameModel)); |
554 this._overviewControls.push(new Timeline.TimelineEventOverviewCPUActivity(th
is._model)); | 577 this._overviewControls.push(new Timeline.TimelineEventOverviewCPUActivity(th
is._model)); |
555 this._overviewControls.push(new Timeline.TimelineEventOverviewNetwork(this._
model)); | 578 this._overviewControls.push(new Timeline.TimelineEventOverviewNetwork(this._
model)); |
556 if (this._captureFilmStripSetting.get()) | 579 if (showScreenshots) |
557 this._overviewControls.push(new Timeline.TimelineFilmStripOverview(this._m
odel, this._filmStripModel)); | 580 this._overviewControls.push(new Timeline.TimelineFilmStripOverview(this._m
odel, this._filmStripModel)); |
558 if (this._captureMemorySetting.get()) | 581 if (showMemory) |
559 this._overviewControls.push(new Timeline.TimelineEventOverviewMemory(this.
_model)); | 582 this._overviewControls.push(new Timeline.TimelineEventOverviewMemory(this.
_model)); |
560 this._overviewPane.setOverviewControls(this._overviewControls); | 583 this._overviewPane.setOverviewControls(this._overviewControls); |
561 | 584 |
562 // Set up the main view. | 585 // Set up the main view. |
563 this._removeAllModeViews(); | 586 this._removeAllModeViews(); |
564 this._flameChart = new Timeline.TimelineFlameChartView( | 587 this._flameChart = new Timeline.TimelineFlameChartView( |
565 this, this._model, this._frameModel, this._irModel, this._extensionTraci
ngModels, this._filters); | 588 this, this._model, this._frameModel, this._irModel, this._extensionTraci
ngModels, this._filters); |
566 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()); | 589 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get()); |
567 this._addModeView(this._flameChart); | 590 this._addModeView(this._flameChart); |
568 | 591 |
569 if (this._captureMemorySetting.get()) { | 592 if (showMemory) { |
570 this._addModeView( | 593 this._addModeView(new Timeline.MemoryCountersGraph( |
571 new Timeline.MemoryCountersGraph(this, this._model, [Timeline.Timeline
UIUtils.visibleEventsFilter()])); | 594 this, this._model, [Timeline.TimelineUIUtils.visibleEventsFilter()])); |
572 } | 595 } |
| 596 if (Runtime.experiments.isEnabled('timelineLandingPage')) |
| 597 this._flameChart.enableNetworkPane(true); |
573 | 598 |
574 this.doResize(); | 599 this.doResize(); |
575 this.select(null); | 600 this.select(null); |
576 } | 601 } |
577 | 602 |
578 _onNetworkChanged() { | 603 _onNetworkChanged() { |
579 if (this._flameChart) | 604 if (this._flameChart) |
580 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get(), true
); | 605 this._flameChart.enableNetworkPane(this._captureNetworkSetting.get(), true
); |
581 } | 606 } |
582 | 607 |
583 _onCPUThrottlingChanged() { | 608 _onCPUThrottlingChanged() { |
584 if (!this._cpuThrottlingManager) | 609 if (!this._cpuThrottlingManager) |
585 return; | 610 return; |
586 var text = this._cpuThrottlingCombobox.selectedOption().value; | 611 var text = this._cpuThrottlingCombobox.selectedOption().value; |
587 this._cpuThrottlingManager.setRate(Number.parseFloat(text)); | 612 this._cpuThrottlingManager.setRate(Number.parseFloat(text)); |
588 } | 613 } |
589 | 614 |
590 /** | 615 /** |
591 * @param {boolean} enabled | 616 * @param {boolean} enabled |
592 */ | 617 */ |
593 _setUIControlsEnabled(enabled) { | 618 _setUIControlsEnabled(enabled) { |
594 /** | 619 this._recordingOptionUIControls.forEach(control => control.setEnabled(enable
d)); |
595 * @param {!UI.ToolbarButton} toolbarButton | |
596 */ | |
597 function handler(toolbarButton) { | |
598 toolbarButton.setEnabled(enabled); | |
599 } | |
600 this._recordingOptionUIControls.forEach(handler); | |
601 } | 620 } |
602 | 621 |
603 /** | 622 /** |
604 * @param {boolean} userInitiated | 623 * @param {boolean} userInitiated |
605 */ | 624 */ |
606 _startRecording(userInitiated) { | 625 _startRecording(userInitiated) { |
607 console.assert(!this._statusPane, 'Status pane is already opened.'); | 626 console.assert(!this._statusPane, 'Status pane is already opened.'); |
608 var mainTarget = SDK.targetManager.mainTarget(); | 627 var mainTarget = SDK.targetManager.mainTarget(); |
609 if (!mainTarget) | 628 if (!mainTarget) |
610 return; | 629 return; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 else if (this._state === Timeline.TimelinePanel.State.Recording) | 690 else if (this._state === Timeline.TimelinePanel.State.Recording) |
672 this._stopRecording(); | 691 this._stopRecording(); |
673 } | 692 } |
674 | 693 |
675 _clear() { | 694 _clear() { |
676 this._showRecordingHelpMessage(); | 695 this._showRecordingHelpMessage(); |
677 this._detailsSplitWidget.hideSidebar(); | 696 this._detailsSplitWidget.hideSidebar(); |
678 this._sessionGeneration = null; | 697 this._sessionGeneration = null; |
679 this._recordingStartTime = 0; | 698 this._recordingStartTime = 0; |
680 this._reset(); | 699 this._reset(); |
| 700 this._recreateToolbarItems(); |
681 } | 701 } |
682 | 702 |
683 _reset() { | 703 _reset() { |
684 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) | 704 if (Runtime.experiments.isEnabled('timelineRuleUsageRecording') && this._mar
kUnusedCSS.get()) |
685 Components.CoverageProfile.instance().reset(); | 705 Components.CoverageProfile.instance().reset(); |
686 | 706 |
687 Components.LineLevelProfile.instance().reset(); | 707 Components.LineLevelProfile.instance().reset(); |
688 this._tracingModel.reset(); | 708 this._tracingModel.reset(); |
689 this._model.reset(); | 709 this._model.reset(); |
690 for (let extensionEntry of this._extensionTracingModels) | 710 for (let extensionEntry of this._extensionTracingModels) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); | 883 var asyncEventsByGroup = this._model.mainThreadAsyncEvents(); |
864 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEventsByGr
oup.get(groups.animation)); | 884 this._irModel.populate(asyncEventsByGroup.get(groups.input), asyncEventsByGr
oup.get(groups.animation)); |
865 this._model.cpuProfiles().forEach(profile => Components.LineLevelProfile.ins
tance().appendCPUProfile(profile)); | 885 this._model.cpuProfiles().forEach(profile => Components.LineLevelProfile.ins
tance().appendCPUProfile(profile)); |
866 if (this._statusPane) | 886 if (this._statusPane) |
867 this._statusPane.hide(); | 887 this._statusPane.hide(); |
868 delete this._statusPane; | 888 delete this._statusPane; |
869 | 889 |
870 for (let entry of this._extensionTracingModels) | 890 for (let entry of this._extensionTracingModels) |
871 entry.model.adjustTime(this._model.minimumRecordTime() + (entry.timeOffset
/ 1000) - this._recordingStartTime); | 891 entry.model.adjustTime(this._model.minimumRecordTime() + (entry.timeOffset
/ 1000) - this._recordingStartTime); |
872 | 892 |
| 893 this._recreateToolbarItems(); |
873 this._flameChart.resizeToPreferredHeights(); | 894 this._flameChart.resizeToPreferredHeights(); |
874 this._overviewPane.reset(); | 895 this._overviewPane.reset(); |
875 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._model.ma
ximumRecordTime()); | 896 this._overviewPane.setBounds(this._model.minimumRecordTime(), this._model.ma
ximumRecordTime()); |
876 this._setAutoWindowTimes(); | 897 this._setAutoWindowTimes(); |
877 this._refreshViews(); | 898 this._refreshViews(); |
878 for (var i = 0; i < this._overviewControls.length; ++i) | 899 for (var i = 0; i < this._overviewControls.length; ++i) |
879 this._overviewControls[i].timelineStopped(); | 900 this._overviewControls[i].timelineStopped(); |
880 this._setMarkers(); | 901 this._setMarkers(); |
881 this._overviewPane.scheduleUpdate(); | 902 this._overviewPane.scheduleUpdate(); |
882 this._updateSearchHighlight(false, true); | 903 this._updateSearchHighlight(false, true); |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 } | 2086 } |
2066 | 2087 |
2067 /** | 2088 /** |
2068 * @override | 2089 * @override |
2069 * @param {!SDK.Target} target | 2090 * @param {!SDK.Target} target |
2070 */ | 2091 */ |
2071 targetRemoved(target) { | 2092 targetRemoved(target) { |
2072 this._targets.remove(target, true); | 2093 this._targets.remove(target, true); |
2073 } | 2094 } |
2074 }; | 2095 }; |
OLD | NEW |