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

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

Issue 2668583008: DevTools: track Node.js UMA (Closed)
Patch Set: rebaseline test Created 3 years, 10 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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 this._webSocketConnectionLostCallback = webSocketConnectionLostCallback; 324 this._webSocketConnectionLostCallback = webSocketConnectionLostCallback;
325 this._connectAndCreateMainTarget(); 325 this._connectAndCreateMainTarget();
326 } 326 }
327 327
328 _connectAndCreateMainTarget() { 328 _connectAndCreateMainTarget() {
329 if (Runtime.queryParam('nodeFrontend')) { 329 if (Runtime.queryParam('nodeFrontend')) {
330 var target = new SDK.Target( 330 var target = new SDK.Target(
331 this, Common.UIString('Node'), SDK.Target.Capability.Target, this._cre ateMainConnection.bind(this), null); 331 this, Common.UIString('Node'), SDK.Target.Capability.Target, this._cre ateMainConnection.bind(this), null);
332 target.subTargetsManager = new SDK.SubTargetsManager(target); 332 target.subTargetsManager = new SDK.SubTargetsManager(target);
333 target.setInspectedURL('Node'); 333 target.setInspectedURL('Node');
334 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConnectToNodeJSFromFr ontend);
334 return; 335 return;
335 } 336 }
336 337
337 var capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Target.Capability.JS | 338 var capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.DOM | SDK.Target.Capability.JS |
338 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target.C apability.Target; 339 SDK.Target.Capability.Log | SDK.Target.Capability.Network | SDK.Target.C apability.Target;
339 if (Runtime.queryParam('isSharedWorker')) { 340 if (Runtime.queryParam('isSharedWorker')) {
340 capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.Log | SDK.Target.Capability.Network | 341 capabilities = SDK.Target.Capability.Browser | SDK.Target.Capability.Log | SDK.Target.Capability.Network |
341 SDK.Target.Capability.Target; 342 SDK.Target.Capability.Target;
342 } else if (Runtime.queryParam('v8only')) { 343 } else if (Runtime.queryParam('v8only')) {
343 capabilities = SDK.Target.Capability.JS; 344 capabilities = SDK.Target.Capability.JS;
345 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ConnectToNodeJSDirect ly);
344 } 346 }
345 347
346 var target = this.createTarget(Common.UIString('Main'), capabilities, this._ createMainConnection.bind(this), null); 348 var target = this.createTarget(Common.UIString('Main'), capabilities, this._ createMainConnection.bind(this), null);
347 target.runtimeAgent().runIfWaitingForDebugger(); 349 target.runtimeAgent().runIfWaitingForDebugger();
348 } 350 }
349 351
350 /** 352 /**
351 * @param {!Protocol.InspectorBackend.Connection.Params} params 353 * @param {!Protocol.InspectorBackend.Connection.Params} params
352 * @return {!Protocol.InspectorBackend.Connection} 354 * @return {!Protocol.InspectorBackend.Connection}
353 */ 355 */
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 /** 403 /**
402 * @param {!SDK.Target} target 404 * @param {!SDK.Target} target
403 */ 405 */
404 targetRemoved(target) {}, 406 targetRemoved(target) {},
405 }; 407 };
406 408
407 /** 409 /**
408 * @type {!SDK.TargetManager} 410 * @type {!SDK.TargetManager}
409 */ 411 */
410 SDK.targetManager = new SDK.TargetManager(); 412 SDK.targetManager = new SDK.TargetManager();
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/host/UserMetrics.js ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698