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

Unified Diff: Source/devtools/front_end/screencast/ScreencastView.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/screencast/ScreencastView.js
diff --git a/Source/devtools/front_end/screencast/ScreencastView.js b/Source/devtools/front_end/screencast/ScreencastView.js
index 461d39f0b7ea3bc11e5ff87be4f4c486190328b6..4d9645eee9251cb01c08805a10748ba6949b4022 100644
--- a/Source/devtools/front_end/screencast/ScreencastView.js
+++ b/Source/devtools/front_end/screencast/ScreencastView.js
@@ -95,7 +95,7 @@ WebInspector.ScreencastView.prototype = {
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ScreencastFrame, this._screencastFrame, this);
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ScreencastVisibilityChanged, this._screencastVisibilityChanged, this);
- WebInspector.profilingLock().addEventListener(WebInspector.Lock.Events.StateChanged, this._onProfilingStateChange, this);
+ WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChange, this);
this._updateGlasspane();
},
@@ -111,7 +111,7 @@ WebInspector.ScreencastView.prototype = {
_startCasting: function()
{
- if (WebInspector.profilingLock().isAcquired())
+ if (WebInspector.targetManager.areTargetsSuspended())
return;
if (this._isCasting)
return;
@@ -185,9 +185,9 @@ WebInspector.ScreencastView.prototype = {
/**
* @param {!WebInspector.Event} event
*/
- _onProfilingStateChange: function(event)
+ _onSuspendStateChange: function(event)
{
- if (WebInspector.profilingLock().isAcquired())
+ if (WebInspector.targetManager.areTargetsSuspended())
this._stopCasting();
else
this._startCasting();
@@ -199,7 +199,7 @@ WebInspector.ScreencastView.prototype = {
if (this._targetInactive) {
this._glassPaneElement.textContent = WebInspector.UIString("The tab is inactive");
this._glassPaneElement.classList.remove("hidden");
- } else if (WebInspector.profilingLock().isAcquired()) {
+ } else if (WebInspector.targetManager.areTargetsSuspended()) {
this._glassPaneElement.textContent = WebInspector.UIString("Profiling in progress");
this._glassPaneElement.classList.remove("hidden");
} else {

Powered by Google App Engine
This is Rietveld 408576698