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

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: changes Created 3 years, 10 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 bf3bcd32954587aa9e8c59a0e96fb306c5d285b6..0e200b9ebe6a5f5199df8679e2a4643c43f74075 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -196,7 +196,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();
@@ -748,34 +747,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