| Index: third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| index 576a84000cb50a297f9b98e9b061c7a5373d923c..22660ca2feab2f568064c53356f8347e40bb0849 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
|
| @@ -728,6 +728,37 @@
|
| }
|
| };
|
|
|
| +/**
|
| + * @implements {UI.ToolbarItem.Provider}
|
| + */
|
| +Main.Main.NodeIndicator = class {
|
| + constructor() {
|
| + var element = createElement('div');
|
| + var shadowRoot = UI.createShadowRootWithCoreStyles(element, 'main/nodeIcon.css');
|
| + this._element = shadowRoot.createChild('div', 'node-icon');
|
| + element.addEventListener('click', () => InspectorFrontendHost.openNodeFrontend(), false);
|
| + this._button = new UI.ToolbarItem(element);
|
| + this._button.setTitle(Common.UIString('Open dedicated DevTools for Node.js'));
|
| + SDK.targetManager.addEventListener(SDK.TargetManager.Events.AvailableNodeTargetsChanged, this._update, this);
|
| + this._button.setVisible(false);
|
| + this._update();
|
| + }
|
| +
|
| + _update() {
|
| + this._element.classList.toggle('inactive', !SDK.targetManager.availableNodeTargetsCount());
|
| + if (SDK.targetManager.availableNodeTargetsCount())
|
| + this._button.setVisible(true);
|
| + }
|
| +
|
| + /**
|
| + * @override
|
| + * @return {?UI.ToolbarItem}
|
| + */
|
| + item() {
|
| + return this._button;
|
| + }
|
| +};
|
| +
|
| Main.NetworkPanelIndicator = class {
|
| constructor() {
|
| // TODO: we should not access network from other modules.
|
|
|