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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2692653003: [Devtools] Added Enable/Disable for request blocking in network (Closed)
Patch Set: Merge branch 'master' of https://chromium.googlesource.com/chromium/src into ADD_ENABLE_DISABLE_REQ… Created 3 years, 9 months 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 side-by-side diff with in-line comments
Download patch
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 f638ac8bd54d555b10eb99d76740fcdcfbea665a..f2e18b84cb64776a3fc2cb4c19808536d80b6477 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -199,7 +199,6 @@ Main.Main = class {
new Main.Main.PauseListener();
new Main.Main.InspectedNodeRevealer();
- new Main.NetworkPanelIndicator();
new Main.SourcesPanelIndicator();
new Main.BackendSettingsSync();
Components.domBreakpointsSidebarPane = new Components.DOMBreakpointsSidebarPane();
@@ -757,34 +756,6 @@ Main.Main.MainMenuItem = class {
/**
* @unrestricted
*/
-Main.NetworkPanelIndicator = class {
- constructor() {
- // TODO: we should not access network from other modules.
- if (!UI.inspectorView.hasPanel('network'))
- return;
- var manager = SDK.multitargetNetworkManager;
- manager.addEventListener(SDK.MultitargetNetworkManager.Events.ConditionsChanged, updateVisibility);
- var blockedURLsSetting = Common.moduleSetting('networkBlockedURLs');
- blockedURLsSetting.addChangeListener(updateVisibility);
- updateVisibility();
-
- function updateVisibility() {
- var icon = null;
- if (manager.isThrottling()) {
- icon = UI.Icon.create('smallicon-warning');
- icon.title = Common.UIString('Network throttling is enabled');
- } else if (blockedURLsSetting.get().length) {
- icon = UI.Icon.create('smallicon-warning');
- icon.title = Common.UIString('Requests may be blocked');
- }
- UI.inspectorView.setPanelIcon('network', icon);
- }
- }
-};
-
-/**
- * @unrestricted
- */
Main.SourcesPanelIndicator = class {
constructor() {
Common.moduleSetting('javaScriptDisabled').addChangeListener(javaScriptDisabledChanged);

Powered by Google App Engine
This is Rietveld 408576698