Chromium Code Reviews| 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; |
| } |