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

Unified Diff: Source/devtools/front_end/console/ConsoleView.js

Issue 648263002: DevTools: [Console] checkbox to hide network messages (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix eustas comments Created 6 years, 2 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
« no previous file with comments | « Source/devtools/front_end/components/FilterBar.js ('k') | Source/devtools/front_end/console/module.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/console/ConsoleView.js
diff --git a/Source/devtools/front_end/console/ConsoleView.js b/Source/devtools/front_end/console/ConsoleView.js
index 41ea4f0530eb384215ace4ffd8beb1a3349ce30f..142415f7f8465575e9f624f19acbe43ca47be49e 100644
--- a/Source/devtools/front_end/console/ConsoleView.js
+++ b/Source/devtools/front_end/console/ConsoleView.js
@@ -1000,6 +1000,9 @@ WebInspector.ConsoleViewFilter.prototype = {
this._levelFilterUI = new WebInspector.NamedBitSetFilterUI(levels, WebInspector.settings.messageLevelFilters);
this._levelFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged, this);
filterBar.addFilter(this._levelFilterUI);
+ this._hideNetworkMessagesCheckbox = new WebInspector.CheckboxFilterUI("hide-network-messages", WebInspector.UIString("Hide network messages"), true, WebInspector.settings.hideNetworkMessages);
+ this._hideNetworkMessagesCheckbox.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged.bind(this), this);
+ filterBar.addFilter(this._hideNetworkMessagesCheckbox);
},
_textFilterChanged: function(event)
@@ -1060,6 +1063,9 @@ WebInspector.ConsoleViewFilter.prototype = {
}
}
+ if (WebInspector.settings.hideNetworkMessages.get() && viewMessage.consoleMessage().source === WebInspector.ConsoleMessage.MessageSource.Network)
+ return false;
+
if (viewMessage.consoleMessage().isGroupMessage())
return true;
@@ -1087,6 +1093,7 @@ WebInspector.ConsoleViewFilter.prototype = {
WebInspector.settings.messageURLFilters.set(this._messageURLFilters);
WebInspector.settings.messageLevelFilters.set({});
this._view._showAllMessagesCheckbox.inputElement.checked = true;
+ this._hideNetworkMessagesCheckbox.setState(false);
this._textFilterUI.setValue("");
this._filterChanged();
},
« no previous file with comments | « Source/devtools/front_end/components/FilterBar.js ('k') | Source/devtools/front_end/console/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698