| Index: Source/devtools/front_end/timeline/TimelinePanel.js
|
| diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
|
| index 0728cd94ab462577db696a1eb389342556351bd9..f2c242f0c2a0bc6ae050e58c2f654d6d5d9fc811 100644
|
| --- a/Source/devtools/front_end/timeline/TimelinePanel.js
|
| +++ b/Source/devtools/front_end/timeline/TimelinePanel.js
|
| @@ -34,6 +34,7 @@
|
| * @extends {WebInspector.Panel}
|
| * @implements {WebInspector.TimelineModeViewDelegate}
|
| * @implements {WebInspector.Searchable}
|
| + * @implements {WebInspector.TargetManager.Observer}
|
| */
|
| WebInspector.TimelinePanel = function()
|
| {
|
| @@ -123,7 +124,6 @@
|
|
|
| this._onModeChanged();
|
| this._detailsSplitView.show(this.element);
|
| - WebInspector.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChanged, this);
|
| }
|
|
|
| WebInspector.TimelinePanel.OverviewMode = {
|
| @@ -138,6 +138,22 @@
|
| WebInspector.TimelinePanel.durationFilterPresetsMs = [0, 1, 15];
|
|
|
| WebInspector.TimelinePanel.prototype = {
|
| + /**
|
| + * @param {!WebInspector.Target} target
|
| + */
|
| + targetAdded: function(target)
|
| + {
|
| + target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChanged, this);
|
| + },
|
| +
|
| + /**
|
| + * @param {!WebInspector.Target} target
|
| + */
|
| + targetRemoved: function(target)
|
| + {
|
| + target.profilingLock.removeEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChanged, this);
|
| + },
|
| +
|
| /**
|
| * @return {?WebInspector.SearchableView}
|
| */
|
| @@ -674,7 +690,7 @@
|
| */
|
| _updateToggleTimelineButton: function(toggled)
|
| {
|
| - var isAcquiredInSomeTarget = WebInspector.profilingLock.isAcquired();
|
| + var isAcquiredInSomeTarget = WebInspector.targetManager.targets().some(function(target) { return target.profilingLock.isAcquired(); });
|
| this.toggleTimelineButton.toggled = toggled;
|
| if (toggled) {
|
| this.toggleTimelineButton.title = WebInspector.UIString("Stop");
|
|
|