Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Unified Diff: Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 614323003: DevTools: enable by default disableAgentsWhenProfile experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: unnecessary line was removed Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/profiler/ProfilesPanel.js
diff --git a/Source/devtools/front_end/profiler/ProfilesPanel.js b/Source/devtools/front_end/profiler/ProfilesPanel.js
index f95f2f8dbcd6e836c810008162eef6ae2f4cd20d..af31e850247f350783d2f64efdbfc7055391b467 100644
--- a/Source/devtools/front_end/profiler/ProfilesPanel.js
+++ b/Source/devtools/front_end/profiler/ProfilesPanel.js
@@ -237,9 +237,9 @@ WebInspector.ProfileType.prototype = {
setProfileBeingRecorded: function(profile)
{
if (this._profileBeingRecorded && this._profileBeingRecorded.target())
- WebInspector.profilingLock().release();
+ WebInspector.targetManager.resumeAllTargets();
if (profile && profile.target())
- WebInspector.profilingLock().acquire();
+ WebInspector.targetManager.suspendAllTargets();
this._profileBeingRecorded = profile;
},
@@ -491,7 +491,7 @@ WebInspector.ProfilesPanel = function()
this.element.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
this._registerShortcuts();
- WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChanged, this);
+ WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChanged, this);
}
WebInspector.ProfilesPanel.prototype = {
@@ -579,7 +579,7 @@ WebInspector.ProfilesPanel.prototype = {
return true;
},
- _onProfilingStateChanged: function()
+ _onSuspendStateChanged: function()
{
this._updateRecordButton(this.recordButton.toggled);
},
@@ -589,10 +589,7 @@ WebInspector.ProfilesPanel.prototype = {
*/
_updateRecordButton: function(toggled)
{
- if (Runtime.experiments.isEnabled("disableAgentsWhenProfile"))
- WebInspector.inspectorView.setCurrentPanelLocked(toggled);
- var isAcquiredInSomeTarget = WebInspector.profilingLock().isAcquired();
- var enable = toggled || !isAcquiredInSomeTarget;
+ var enable = toggled || !WebInspector.targetManager.allTargetsSuspended();
this.recordButton.setEnabled(enable);
this.recordButton.toggled = toggled;
if (enable)

Powered by Google App Engine
This is Rietveld 408576698