[Global] Update refs to SDK.targetManager
Bug: 1006759
Change-Id: I0686ef929b89e75c2ea8a731c593d955eca85935
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2015119
Reviewed-by: Tim van der Lippe <[email protected]>
Commit-Queue: Paul Lewis <[email protected]>
diff --git a/front_end/inspector_main/InspectorMain.js b/front_end/inspector_main/InspectorMain.js
index 020c96b..bf471ec 100644
--- a/front_end/inspector_main/InspectorMain.js
+++ b/front_end/inspector_main/InspectorMain.js
@@ -14,8 +14,8 @@
await SDK.initMainConnection(async () => {
const type = Root.Runtime.queryParam('v8only') ? SDK.Target.Type.Node : SDK.Target.Type.Frame;
const waitForDebuggerInPage = type === SDK.Target.Type.Frame && Root.Runtime.queryParam('panel') === 'sources';
- const target =
- SDK.targetManager.createTarget('main', Common.UIString('Main'), type, null, undefined, waitForDebuggerInPage);
+ const target = self.SDK.targetManager.createTarget(
+ 'main', Common.UIString('Main'), type, null, undefined, waitForDebuggerInPage);
// Only resume target during the first connection,
// subsequent connections are due to connection hand-over,
@@ -84,7 +84,7 @@
* @return {boolean}
*/
handleAction(context, actionId) {
- SDK.targetManager.mainTarget().pageAgent().bringToFront();
+ self.SDK.targetManager.mainTarget().pageAgent().bringToFront();
return true;
}
}
@@ -100,7 +100,7 @@
element.addEventListener('click', () => Host.InspectorFrontendHost.openNodeFrontend(), false);
this._button = new UI.ToolbarItem(element);
this._button.setTitle(Common.UIString('Open dedicated DevTools for Node.js'));
- SDK.targetManager.addEventListener(
+ self.SDK.targetManager.addEventListener(
SDK.TargetManager.Events.AvailableTargetsChanged,
event => this._update(/** @type {!Array<!Protocol.Target.TargetInfo>} */ (event.data)));
this._button.setVisible(false);
@@ -163,7 +163,7 @@
this._emulatePageFocusSetting = Common.settings.moduleSetting('emulatePageFocus');
this._emulatePageFocusSetting.addChangeListener(this._update, this);
- SDK.targetManager.observeTargets(this);
+ self.SDK.targetManager.observeTargets(this);
}
/**
@@ -182,7 +182,7 @@
}
_update() {
- for (const target of SDK.targetManager.targets()) {
+ for (const target of self.SDK.targetManager.targets()) {
this._updateTarget(target);
}
}