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

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

Issue 2431223003: [DevTools]: Require explicit connection (Closed)
Patch Set: Reworked - again 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 f2afa4f500777defa67dfee04da99e0fe2030151..f15412ee0958aba3f3ba5afc308ab3c6f2af5c0b 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);
@@ -229,7 +230,8 @@ WebInspector.TargetManager.prototype = {
if (target.subTargetsManager && target.hasBrowserCapability())
target.serviceWorkerManager = new WebInspector.ServiceWorkerManager(target, target.subTargetsManager);
- this.addTarget(target);
+ if (!createOnly)
+ this.addTarget(target);
return target;
},

Powered by Google App Engine
This is Rietveld 408576698