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

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

Issue 2625223002: [DevTools] Dedicated frontend for debugging Node. (Closed)
Patch Set: test fix Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @unrestricted 8 * @unrestricted
9 */ 9 */
10 SDK.TargetManager = class extends Common.Object { 10 SDK.TargetManager = class extends Common.Object {
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 333
334 /** 334 /**
335 * @param {function()} webSocketConnectionLostCallback 335 * @param {function()} webSocketConnectionLostCallback
336 */ 336 */
337 connectToMainTarget(webSocketConnectionLostCallback) { 337 connectToMainTarget(webSocketConnectionLostCallback) {
338 this._webSocketConnectionLostCallback = webSocketConnectionLostCallback; 338 this._webSocketConnectionLostCallback = webSocketConnectionLostCallback;
339 this._connectAndCreateMainTarget(); 339 this._connectAndCreateMainTarget();
340 } 340 }
341 341
342 _connectAndCreateMainTarget() { 342 _connectAndCreateMainTarget() {
343 if (Runtime.queryParam('nodeFrontend')) {
344 var target = new SDK.Target(
345 this, Common.UIString('Node'), SDK.Target.Capability.Target, this._cre ateMainConnection.bind(this), null);
346 target.subTargetsManager = new SDK.SubTargetsManager(target);
347 target.setInspectedURL('Node');
348 return;
349 }
350
343 var capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Target.Capability.JS | 351 var capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Target.Capability.JS |
344 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target.C apability.Target; 352 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target.C apability.Target;
345 if (Runtime.queryParam('isSharedWorker')) { 353 if (Runtime.queryParam('isSharedWorker')) {
346 capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.Log | SDK.Target.Capability.Network | 354 capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.Log | SDK.Target.Capability.Network |
347 SDK.Target.Capability.Target; 355 SDK.Target.Capability.Target;
348 } else if (Runtime.queryParam('v8only')) { 356 } else if (Runtime.queryParam('v8only')) {
349 capabilities = SDK.Target.Capability.JS; 357 capabilities = SDK.Target.Capability.JS;
350 } 358 }
351 359
352 var target = this.createTarget(Common.UIString('Main'), capabilities, this._ createMainConnection.bind(this), null); 360 var target = this.createTarget(Common.UIString('Main'), capabilities, this._ createMainConnection.bind(this), null);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 /** 415 /**
408 * @param {!SDK.Target} target 416 * @param {!SDK.Target} target
409 */ 417 */
410 targetRemoved(target) {}, 418 targetRemoved(target) {},
411 }; 419 };
412 420
413 /** 421 /**
414 * @type {!SDK.TargetManager} 422 * @type {!SDK.TargetManager}
415 */ 423 */
416 SDK.targetManager = new SDK.TargetManager(); 424 SDK.targetManager = new SDK.TargetManager();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698