| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). | 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 continue; | 721 continue; |
| 722 moreTools.appendItem(extension.title(), UI.viewManager.showView.bind(UI.vi
ewManager, descriptor['id'])); | 722 moreTools.appendItem(extension.title(), UI.viewManager.showView.bind(UI.vi
ewManager, descriptor['id'])); |
| 723 } | 723 } |
| 724 | 724 |
| 725 var helpSubMenu = contextMenu.namedSubMenu('mainMenuHelp'); | 725 var helpSubMenu = contextMenu.namedSubMenu('mainMenuHelp'); |
| 726 helpSubMenu.appendAction('settings.documentation'); | 726 helpSubMenu.appendAction('settings.documentation'); |
| 727 helpSubMenu.appendItem('Release Notes', () => InspectorFrontendHost.openInNe
wTab(Help.latestReleaseNote().link)); | 727 helpSubMenu.appendItem('Release Notes', () => InspectorFrontendHost.openInNe
wTab(Help.latestReleaseNote().link)); |
| 728 } | 728 } |
| 729 }; | 729 }; |
| 730 | 730 |
| 731 /** | |
| 732 * @implements {UI.ToolbarItem.Provider} | |
| 733 */ | |
| 734 Main.Main.NodeIndicator = class { | |
| 735 constructor() { | |
| 736 var element = createElement('div'); | |
| 737 var shadowRoot = UI.createShadowRootWithCoreStyles(element, 'main/nodeIcon.c
ss'); | |
| 738 this._element = shadowRoot.createChild('div', 'node-icon'); | |
| 739 element.addEventListener('click', () => InspectorFrontendHost.openNodeFronte
nd(), false); | |
| 740 this._button = new UI.ToolbarItem(element); | |
| 741 this._button.setTitle(Common.UIString('Open dedicated DevTools for Node.js')
); | |
| 742 SDK.targetManager.addEventListener(SDK.TargetManager.Events.AvailableNodeTar
getsChanged, this._update, this); | |
| 743 this._button.setVisible(false); | |
| 744 this._update(); | |
| 745 } | |
| 746 | |
| 747 _update() { | |
| 748 this._element.classList.toggle('inactive', !SDK.targetManager.availableNodeT
argetsCount()); | |
| 749 if (SDK.targetManager.availableNodeTargetsCount()) | |
| 750 this._button.setVisible(true); | |
| 751 } | |
| 752 | |
| 753 /** | |
| 754 * @override | |
| 755 * @return {?UI.ToolbarItem} | |
| 756 */ | |
| 757 item() { | |
| 758 return this._button; | |
| 759 } | |
| 760 }; | |
| 761 | |
| 762 Main.NetworkPanelIndicator = class { | 731 Main.NetworkPanelIndicator = class { |
| 763 constructor() { | 732 constructor() { |
| 764 // TODO: we should not access network from other modules. | 733 // TODO: we should not access network from other modules. |
| 765 if (!UI.inspectorView.hasPanel('network')) | 734 if (!UI.inspectorView.hasPanel('network')) |
| 766 return; | 735 return; |
| 767 var manager = SDK.multitargetNetworkManager; | 736 var manager = SDK.multitargetNetworkManager; |
| 768 manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChan
ged, updateVisibility); | 737 manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChan
ged, updateVisibility); |
| 769 manager.addEventListener(SDK.MultitargetNetworkManager.Events.BlockedPattern
sChanged, updateVisibility); | 738 manager.addEventListener(SDK.MultitargetNetworkManager.Events.BlockedPattern
sChanged, updateVisibility); |
| 770 updateVisibility(); | 739 updateVisibility(); |
| 771 | 740 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 * @override | 952 * @override |
| 984 * @return {?Element} | 953 * @return {?Element} |
| 985 */ | 954 */ |
| 986 settingElement() { | 955 settingElement() { |
| 987 return UI.SettingsUI.createSettingCheckbox( | 956 return UI.SettingsUI.createSettingCheckbox( |
| 988 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); | 957 Common.UIString('Show rulers'), Common.moduleSetting('showMetricsRulers'
)); |
| 989 } | 958 } |
| 990 }; | 959 }; |
| 991 | 960 |
| 992 new Main.Main(); | 961 new Main.Main(); |
| OLD | NEW |