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

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

Issue 2387283003: [DevTools] Support all targets discovery in Target domain. (Closed)
Patch Set: small fix 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/browser_protocol.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.SDKModel} 7 * @extends {WebInspector.SDKModel}
8 * @param {!WebInspector.Target} target 8 * @param {!WebInspector.Target} target
9 */ 9 */
10 WebInspector.SubTargetsManager = function(target) 10 WebInspector.SubTargetsManager = function(target)
11 { 11 {
12 WebInspector.SDKModel.call(this, WebInspector.SubTargetsManager, target); 12 WebInspector.SDKModel.call(this, WebInspector.SubTargetsManager, target);
13 target.registerTargetDispatcher(new WebInspector.SubTargetsDispatcher(this)) ; 13 target.registerTargetDispatcher(new WebInspector.SubTargetsDispatcher(this)) ;
14 this._lastAnonymousTargetId = 0; 14 this._lastAnonymousTargetId = 0;
15 this._agent = target.targetAgent(); 15 this._agent = target.targetAgent();
16 16
17 /** @type {!Map<string, !WebInspector.TargetInfo>} */ 17 /** @type {!Map<string, !WebInspector.TargetInfo>} */
18 this._allTargets = new Map(); 18 this._allTargets = new Map();
19 19
20 /** @type {!Map<string, !WebInspector.Target>} */ 20 /** @type {!Map<string, !WebInspector.Target>} */
21 this._attachedTargets = new Map(); 21 this._attachedTargets = new Map();
22 /** @type {!Map<string, !WebInspector.SubTargetConnection>} */ 22 /** @type {!Map<string, !WebInspector.SubTargetConnection>} */
23 this._connections = new Map(); 23 this._connections = new Map();
24 24
25 this._agent.setAutoAttach(true /* autoAttach */, true /* waitForDebuggerOnSt art */); 25 this._agent.setAutoAttach(true /* autoAttach */, true /* waitForDebuggerOnSt art */);
26 this._agent.setAttachToFrames(Runtime.experiments.isEnabled("autoAttachToCro ssProcessSubframes")); 26 this._agent.setAttachToFrames(Runtime.experiments.isEnabled("autoAttachToCro ssProcessSubframes"));
27 this._agent.enable();
28 } 27 }
29 28
30 /** @enum {symbol} */ 29 /** @enum {symbol} */
31 WebInspector.SubTargetsManager.Events = { 30 WebInspector.SubTargetsManager.Events = {
32 SubTargetAdded: Symbol("SubTargetAdded"), 31 SubTargetAdded: Symbol("SubTargetAdded"),
33 SubTargetRemoved: Symbol("SubTargetRemoved"), 32 SubTargetRemoved: Symbol("SubTargetRemoved"),
34 } 33 }
35 34
36 WebInspector.SubTargetsManager._InfoSymbol = Symbol("SubTargetInfo"); 35 WebInspector.SubTargetsManager._InfoSymbol = Symbol("SubTargetInfo");
37 36
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 this.url = payload.url; 315 this.url = payload.url;
317 this.type = payload.type; 316 this.type = payload.type;
318 if (this.type !== "page" && this.type !== "iframe") { 317 if (this.type !== "page" && this.type !== "iframe") {
319 this.title = WebInspector.UIString("Worker: %s", this.url); 318 this.title = WebInspector.UIString("Worker: %s", this.url);
320 this.canActivate = false; 319 this.canActivate = false;
321 } else { 320 } else {
322 this.title = payload.title; 321 this.title = payload.title;
323 this.canActivate = true; 322 this.canActivate = true;
324 } 323 }
325 } 324 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/browser_protocol.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698