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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
117 this._stackView = new WebInspector.StackView(false); | 117 this._stackView = new WebInspector.StackView(false); |
118 this._stackView.show(this._searchableView.element); | 118 this._stackView.show(this._searchableView.element); |
119 this._stackView.element.classList.add("timeline-view-stack"); | 119 this._stackView.element.classList.add("timeline-view-stack"); |
120 | 120 |
121 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve nts.DockSideChanged, this._dockSideChanged.bind(this)); | 121 WebInspector.dockController.addEventListener(WebInspector.DockController.Eve nts.DockSideChanged, this._dockSideChanged.bind(this)); |
122 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi s._dockSideChanged.bind(this)); | 122 WebInspector.settings.splitVerticallyWhenDockedToRight.addChangeListener(thi s._dockSideChanged.bind(this)); |
123 this._dockSideChanged(); | 123 this._dockSideChanged(); |
124 | 124 |
125 this._onModeChanged(); | 125 this._onModeChanged(); |
126 this._detailsSplitView.show(this.element); | 126 this._detailsSplitView.show(this.element); |
127 WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.State Changed, this._onProfilingStateChanged, this); | 127 WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Event s.SuspendStateChanged, this._onSuspendStateChanged, this); |
128 } | 128 } |
129 | 129 |
130 WebInspector.TimelinePanel.OverviewMode = { | 130 WebInspector.TimelinePanel.OverviewMode = { |
131 Events: "Events", | 131 Events: "Events", |
132 Frames: "Frames" | 132 Frames: "Frames" |
133 }; | 133 }; |
134 | 134 |
135 // Define row and header height, should be in sync with styles for timeline grap hs. | 135 // Define row and header height, should be in sync with styles for timeline grap hs. |
136 WebInspector.TimelinePanel.rowHeight = 18; | 136 WebInspector.TimelinePanel.rowHeight = 18; |
137 WebInspector.TimelinePanel.headerHeight = 20; | 137 WebInspector.TimelinePanel.headerHeight = 20; |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
623 /** | 623 /** |
624 * @param {boolean} enabled | 624 * @param {boolean} enabled |
625 */ | 625 */ |
626 _setUIControlsEnabled: function(enabled) { | 626 _setUIControlsEnabled: function(enabled) { |
627 function handler(uiControl) | 627 function handler(uiControl) |
628 { | 628 { |
629 uiControl.checkbox.disabled = !enabled; | 629 uiControl.checkbox.disabled = !enabled; |
630 uiControl.label.classList.toggle("dimmed", !enabled); | 630 uiControl.label.classList.toggle("dimmed", !enabled); |
631 } | 631 } |
632 this._recordingOptionUIControls.forEach(handler); | 632 this._recordingOptionUIControls.forEach(handler); |
633 WebInspector.inspectorView.setCurrentPanelLocked(!enabled); | |
634 }, | 633 }, |
635 | 634 |
636 /** | 635 /** |
637 * @param {boolean} userInitiated | 636 * @param {boolean} userInitiated |
638 */ | 637 */ |
639 _startRecording: function(userInitiated) | 638 _startRecording: function(userInitiated) |
640 { | 639 { |
641 this._userInitiatedRecording = userInitiated; | 640 this._userInitiatedRecording = userInitiated; |
642 this._model.startRecording(this._captureCausesSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get()); | 641 this._model.startRecording(this._captureCausesSetting.get(), this._captu reMemorySetting.get(), this._captureLayersAndPicturesSetting && this._captureLay ersAndPicturesSetting.get()); |
643 if (this._lazyFrameModel) | 642 if (this._lazyFrameModel) |
(...skipping 14 matching lines...) Expand all Loading... | |
658 this._userInitiatedRecording = false; | 657 this._userInitiatedRecording = false; |
659 this._model.stopRecording(); | 658 this._model.stopRecording(); |
660 if (this._progressElement) | 659 if (this._progressElement) |
661 this._updateProgress(WebInspector.UIString("Retrieving events\u2026" )); | 660 this._updateProgress(WebInspector.UIString("Retrieving events\u2026" )); |
662 | 661 |
663 for (var i = 0; i < this._overviewControls.length; ++i) | 662 for (var i = 0; i < this._overviewControls.length; ++i) |
664 this._overviewControls[i].timelineStopped(); | 663 this._overviewControls[i].timelineStopped(); |
665 this._setUIControlsEnabled(true); | 664 this._setUIControlsEnabled(true); |
666 }, | 665 }, |
667 | 666 |
668 _onProfilingStateChanged: function() | 667 _onSuspendStateChanged: function() |
669 { | 668 { |
670 this._updateToggleTimelineButton(this.toggleTimelineButton.toggled); | 669 this._updateToggleTimelineButton(this.toggleTimelineButton.toggled); |
671 }, | 670 }, |
672 | 671 |
673 /** | 672 /** |
674 * @param {boolean} toggled | 673 * @param {boolean} toggled |
675 */ | 674 */ |
676 _updateToggleTimelineButton: function(toggled) | 675 _updateToggleTimelineButton: function(toggled) |
677 { | 676 { |
678 var isAcquiredInSomeTarget = WebInspector.profilingLock().isAcquired(); | 677 var isAcquiredInSomeTarget = WebInspector.targetManager.areTargetsSuspen ded(); |
aandrey
2014/10/15 18:14:06
we should do smth with the naming
loislo
2014/10/16 09:08:22
Done.
| |
679 this.toggleTimelineButton.toggled = toggled; | 678 this.toggleTimelineButton.toggled = toggled; |
680 if (toggled) { | 679 if (toggled) { |
681 this.toggleTimelineButton.title = WebInspector.UIString("Stop"); | 680 this.toggleTimelineButton.title = WebInspector.UIString("Stop"); |
682 this.toggleTimelineButton.setEnabled(true); | 681 this.toggleTimelineButton.setEnabled(true); |
683 } else if (this._stopPending) { | 682 } else if (this._stopPending) { |
684 this.toggleTimelineButton.title = WebInspector.UIString("Stop pendin g"); | 683 this.toggleTimelineButton.title = WebInspector.UIString("Stop pendin g"); |
685 this.toggleTimelineButton.setEnabled(false); | 684 this.toggleTimelineButton.setEnabled(false); |
686 } else if (isAcquiredInSomeTarget) { | 685 } else if (isAcquiredInSomeTarget) { |
687 this.toggleTimelineButton.title = WebInspector.anotherProfilerActive Label(); | 686 this.toggleTimelineButton.title = WebInspector.anotherProfilerActive Label(); |
688 this.toggleTimelineButton.setEnabled(false); | 687 this.toggleTimelineButton.setEnabled(false); |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1456 | 1455 |
1457 WebInspector.TimelinePanelFactory.prototype = { | 1456 WebInspector.TimelinePanelFactory.prototype = { |
1458 /** | 1457 /** |
1459 * @return {!WebInspector.Panel} | 1458 * @return {!WebInspector.Panel} |
1460 */ | 1459 */ |
1461 createPanel: function() | 1460 createPanel: function() |
1462 { | 1461 { |
1463 return WebInspector.TimelinePanel._instance(); | 1462 return WebInspector.TimelinePanel._instance(); |
1464 } | 1463 } |
1465 } | 1464 } |
OLD | NEW |