Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
| index e3eda70ec4c1382bcd4dd31871f89dbe12c32063..d1a825b3899c0bc6ebae7c9f165937b15e70746d 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js |
| @@ -107,6 +107,27 @@ Network.NetworkPanel = class extends UI.Panel { |
| this._networkLogView.addEventListener(Network.NetworkLogView.Events.UpdateRequest, this._onUpdateRequest, this); |
| Components.DataSaverInfobar.maybeShowInPanel(this); |
| + |
| + var manager = SDK.multitargetNetworkManager; |
| + manager.on(SDK.MultitargetNetworkManager.RequestBlockingEnabledChangedEvent, updateVisibility.bind(this)); |
| + manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged, updateVisibility.bind(this)); |
| + var blockedURLsSetting = Common.moduleSetting('networkBlockedURLs'); |
| + blockedURLsSetting.addChangeListener(updateVisibility.bind(this)); |
| + |
| + /** |
| + * @this {Network.NetworkPanel} |
| + */ |
| + function updateVisibility() { |
|
pfeldman
2017/02/22 00:02:46
You need to call it immediately as well - what if
allada
2017/03/03 20:14:02
Done.
|
| + var icon = null; |
| + if (manager.isThrottling()) { |
| + icon = UI.Icon.create('smallicon-warning'); |
| + icon.title = Common.UIString('Network throttling is enabled'); |
| + } else if (SDK.multitargetNetworkManager.isRequestBlockingEnabled() && blockedURLsSetting.get().length) { |
| + icon = UI.Icon.create('smallicon-warning'); |
| + icon.title = Common.UIString('Requests may be blocked'); |
|
pfeldman
2017/02/22 00:02:46
In this case you can go even further and report th
allada
2017/03/03 20:14:02
We report which requests are blocked in the networ
|
| + } |
| + UI.inspectorView.setPanelIcon(this.name, icon); |
| + } |
| } |
| /** |