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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network/BlockedURLsPane.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/network/BlockedURLsPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network/BlockedURLsPane.js b/third_party/WebKit/Source/devtools/front_end/network/BlockedURLsPane.js
index e38c0457e2ed02ba16965e3b8d5b169cd457d78e..ef03393e3fa4bb20e1b6baab5f20dfb759547bdd 100644
--- a/third_party/WebKit/Source/devtools/front_end/network/BlockedURLsPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/network/BlockedURLsPane.js
@@ -24,6 +24,14 @@ Network.BlockedURLsPane = class extends UI.VBox {
clearButton.addEventListener(UI.ToolbarButton.Events.Click, this._removeAll, this);
this._toolbar.appendToolbarItem(clearButton);
+ var enableRequestBlockingCheckbox = new UI.ToolbarCheckbox(
pfeldman 2017/03/06 18:44:59 You can now use session setting for this!
allada 2017/03/06 23:26:41 Done.
+ Common.UIString('Enable Request Blocking'), Common.UIString('Enables request blocking'), undefined,
+ () => SDK.multitargetNetworkManager.setRequestBlockingEnabled(enableRequestBlockingCheckbox.checked()));
+ SDK.multitargetNetworkManager.on(
pfeldman 2017/03/06 18:44:59 And you would not need this.
allada 2017/03/06 23:26:41 Done.
+ SDK.MultitargetNetworkManager.RequestBlockingEnabledChangedEvent,
+ event => enableRequestBlockingCheckbox.setChecked(SDK.multitargetNetworkManager.isRequestBlockingEnabled()));
+ this._toolbar.appendToolbarItem(enableRequestBlockingCheckbox);
+
this._emptyElement = this.contentElement.createChild('div', 'no-blocked-urls');
this._emptyElement.createChild('span').textContent = Common.UIString('Requests are not blocked. ');
var addLink = this._emptyElement.createChild('span', 'link');

Powered by Google App Engine
This is Rietveld 408576698