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

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

Issue 2897033005: DevTools: introduce setting to filter only user messages from console API (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
index cc55d6f20c8e07f9b8e0290af3b478deab959c1e..f275504d461318517f80a31c5d9abd4e6e978322 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -97,6 +97,7 @@ Console.ConsoleView = class extends UI.VBox {
settingsToolbarLeft.appendToolbarItem(this._hideNetworkMessagesCheckbox);
settingsToolbarLeft.appendToolbarItem(this._preserveLogCheckbox);
settingsToolbarLeft.appendToolbarItem(this._filter._filterByExecutionContextCheckbox);
+ settingsToolbarLeft.appendToolbarItem(this._filter._filterConsoleAPICheckbox);
var settingsToolbarRight = new UI.Toolbar('', settingsPane.element);
settingsToolbarRight.makeVertical();
@@ -1000,6 +1001,9 @@ Console.ConsoleViewFilter = class {
Common.UIString('Selected context only'),
Common.UIString('Only show messages from the current context (top, iframe, worker, extension)'),
filterChangedCallback);
+ this._filterConsoleAPICheckbox = new UI.ToolbarCheckbox(
pfeldman 2017/05/23 18:59:26 Convert it into a setting for consistency and assi
luoe 2017/05/23 20:28:51 Done. 'selected context only' was also wasn't a s
+ Common.UIString('User messages only'),
+ Common.UIString('Only show messages from console.* methods and evaluations'), filterChangedCallback);
this._filterChanged = filterChangedCallback;
this._messageURLFiltersSetting = Common.settings.createSetting('messageURLFilters', {});
@@ -1109,6 +1113,10 @@ Console.ConsoleViewFilter = class {
return false;
}
+ if (this._filterConsoleAPICheckbox.checked() &&
+ message.source !== ConsoleModel.ConsoleMessage.MessageSource.ConsoleAPI)
+ return false;
+
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698