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

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

Issue 2543633009: [Devtools] Template fromTarget() function calls to model (Closed)
Patch Set: fix Created 4 years 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 // 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 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 SDK.SubTargetsManager = class extends SDK.SDKModel { 7 SDK.SubTargetsManager = class extends SDK.SDKModel {
8 /** 8 /**
9 * @param {!SDK.Target} target 9 * @param {!SDK.Target} target
10 */ 10 */
(...skipping 19 matching lines...) Expand all
30 this._agent.setDiscoverTargets(true); 30 this._agent.setDiscoverTargets(true);
31 } 31 }
32 SDK.targetManager.addEventListener(SDK.TargetManager.Events.MainFrameNavigat ed, this._mainFrameNavigated, this); 32 SDK.targetManager.addEventListener(SDK.TargetManager.Events.MainFrameNavigat ed, this._mainFrameNavigated, this);
33 } 33 }
34 34
35 /** 35 /**
36 * @param {!SDK.Target} target 36 * @param {!SDK.Target} target
37 * @return {?SDK.SubTargetsManager} 37 * @return {?SDK.SubTargetsManager}
38 */ 38 */
39 static fromTarget(target) { 39 static fromTarget(target) {
40 return /** @type {?SDK.SubTargetsManager} */ (target.model(SDK.SubTargetsMan ager)); 40 return target.model(SDK.SubTargetsManager);
41 } 41 }
42 42
43 /** 43 /**
44 * @override 44 * @override
45 * @return {!Promise} 45 * @return {!Promise}
46 */ 46 */
47 suspendModel() { 47 suspendModel() {
48 var fulfill; 48 var fulfill;
49 var promise = new Promise(f => fulfill = f); 49 var promise = new Promise(f => fulfill = f);
50 this._agent.setAutoAttach(true /* autoAttach */, false /* waitForDebuggerOnS tart */, fulfill); 50 this._agent.setAutoAttach(true /* autoAttach */, false /* waitForDebuggerOnS tart */, fulfill);
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 this._attachedCallback = null; 452 this._attachedCallback = null;
453 } 453 }
454 454
455 /** 455 /**
456 * @return {boolean} 456 * @return {boolean}
457 */ 457 */
458 canConnect() { 458 canConnect() {
459 return this._isRemote; 459 return this._isRemote;
460 } 460 }
461 }; 461 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698