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

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: small change 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 2df95006537b07fc182366004fc2b9269e3836c5..e357dbe50092e549eac10f0ef83b01334d193405 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,8 @@ 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 areTargetsSuspended = WebInspector.targetManager.areTargetsSuspended();
aandrey 2014/10/15 18:14:06 nit: areTargetsSuspended -> allTargetsSuspended ni
loislo 2014/10/16 09:08:22 Done.
+ var enable = toggled || !areTargetsSuspended;
yurys 2014/10/15 14:07:34 Should this be toggled && !areTargetsSuspended ?
loislo 2014/10/15 15:38:47 we mark the button as enabled if no-one records a
this.recordButton.setEnabled(enable);
this.recordButton.toggled = toggled;
if (enable)

Powered by Google App Engine
This is Rietveld 408576698