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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js

Issue 2431223003: [DevTools]: Require explicit connection (Closed)
Patch Set: Fixed Node.JS connection title Created 4 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: third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
index 85e2e4aee06d1567bbf6b9d87ca9411d067d8812..b18fc81da0b2a63560ea6fa8f76e324ab556e2eb 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/TargetManager.js
@@ -185,9 +185,10 @@ WebInspector.TargetManager.prototype = {
* @param {number} capabilitiesMask
* @param {!InspectorBackendClass.Connection.Factory} connectionFactory
* @param {?WebInspector.Target} parentTarget
+ * @param {boolean=} createOnly
* @return {!WebInspector.Target}
*/
- createTarget: function(name, capabilitiesMask, connectionFactory, parentTarget)
+ createTarget: function(name, capabilitiesMask, connectionFactory, parentTarget, createOnly)
{
var target = new WebInspector.Target(this, name, capabilitiesMask, connectionFactory, parentTarget);
@@ -230,8 +231,8 @@ WebInspector.TargetManager.prototype = {
target.subTargetsManager = new WebInspector.SubTargetsManager(target);
target.serviceWorkerManager = new WebInspector.ServiceWorkerManager(target, target.subTargetsManager);
}
-
- this.addTarget(target);
+ if (!createOnly)
dgozman 2016/10/26 22:14:06 Let's avoid this boolean at all costs.
+ this.addTarget(target);
return target;
},

Powered by Google App Engine
This is Rietveld 408576698