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

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

Issue 2691103007: DevTools: more console setting checkboxes in toolbar (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/consoleView.css » ('j') | 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 c8e5bb0fcf519bf759cbf20b9a46ef4d9804a431..e435228680f86067dc7938fe70f8fe0855754dd6 100644
--- a/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
+++ b/third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js
@@ -86,15 +86,29 @@ Console.ConsoleView = class extends UI.VBox {
this._hideNetworkMessagesCheckbox = new UI.ToolbarSettingCheckbox(
this._filter._hideNetworkMessagesSetting, this._filter._hideNetworkMessagesSetting.title(),
Common.UIString('Hide network'));
+ var monitoringXHREnabledSetting = Common.moduleSetting('monitoringXHREnabled');
+ this._timestampsSetting = Common.moduleSetting('consoleTimestampsEnabled');
+ this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete');
- var settingsToolbar = new UI.Toolbar('', this._contentsElement);
- settingsToolbar.appendToolbarItem(this._hideNetworkMessagesCheckbox);
- settingsToolbar.appendToolbarItem(this._preserveLogCheckbox);
- settingsToolbar.appendToolbarItem(this._filter._showTargetMessagesCheckbox);
+ var settingsPane = new UI.HBox();
+ settingsPane.show(this._contentsElement);
+ settingsPane.element.classList.add('console-settings-pane');
+
+ var settingsToolbarLeft = new UI.Toolbar('', settingsPane.element);
+ settingsToolbarLeft.makeVertical();
+ settingsToolbarLeft.appendToolbarItem(this._hideNetworkMessagesCheckbox);
+ settingsToolbarLeft.appendToolbarItem(this._preserveLogCheckbox);
+ settingsToolbarLeft.appendToolbarItem(this._filter._showTargetMessagesCheckbox);
+
+ var settingsToolbarRight = new UI.Toolbar('', settingsPane.element);
+ settingsToolbarRight.makeVertical();
+ settingsToolbarRight.appendToolbarItem(new UI.ToolbarSettingCheckbox(monitoringXHREnabledSetting));
+ settingsToolbarRight.appendToolbarItem(new UI.ToolbarSettingCheckbox(this._timestampsSetting));
+ settingsToolbarRight.appendToolbarItem(new UI.ToolbarSettingCheckbox(this._consoleHistoryAutocompleteSetting));
if (!this._showSettingsPaneSetting.get())
- settingsToolbar.element.classList.add('hidden');
+ settingsPane.element.classList.add('hidden');
this._showSettingsPaneSetting.addChangeListener(
- () => settingsToolbar.element.classList.toggle('hidden', !this._showSettingsPaneSetting.get()));
+ () => settingsPane.element.classList.toggle('hidden', !this._showSettingsPaneSetting.get()));
this._viewport = new Console.ConsoleViewport(this);
this._viewport.setStickToBottom(true);
@@ -128,7 +142,7 @@ Console.ConsoleView = class extends UI.VBox {
this._registerShortcuts();
this._messagesElement.addEventListener('contextmenu', this._handleContextMenuEvent.bind(this), false);
- Common.moduleSetting('monitoringXHREnabled').addChangeListener(this._monitoringXHREnabledSettingChanged, this);
+ monitoringXHREnabledSetting.addChangeListener(this._monitoringXHREnabledSettingChanged, this);
this._linkifier = new Components.Linkifier();
@@ -142,7 +156,6 @@ Console.ConsoleView = class extends UI.VBox {
this._prompt.show(this._promptElement);
this._prompt.element.addEventListener('keydown', this._promptKeyDown.bind(this), true);
- this._consoleHistoryAutocompleteSetting = Common.moduleSetting('consoleHistoryAutocomplete');
this._consoleHistoryAutocompleteSetting.addChangeListener(this._consoleHistoryAutocompleteChanged, this);
var historyData = this._consoleHistorySetting.get();
@@ -150,7 +163,7 @@ Console.ConsoleView = class extends UI.VBox {
this._consoleHistoryAutocompleteChanged();
this._updateFilterStatus();
- Common.moduleSetting('consoleTimestampsEnabled').addChangeListener(this._consoleTimestampsSettingChanged, this);
+ this._timestampsSetting.addChangeListener(this._consoleTimestampsSettingChanged, this);
this._registerWithMessageSink();
SDK.targetManager.observeTargets(this);
@@ -676,7 +689,7 @@ Console.ConsoleView = class extends UI.VBox {
* @return {boolean}
*/
_tryToCollapseMessages(lastMessage, viewMessage) {
- var timestampsShown = Common.moduleSetting('consoleTimestampsEnabled').get();
+ var timestampsShown = this._timestampsSetting.get();
if (!timestampsShown && viewMessage && !lastMessage.consoleMessage().isGroupMessage() &&
lastMessage.consoleMessage().isEqual(viewMessage.consoleMessage())) {
viewMessage.incrementRepeatCount();
@@ -1038,8 +1051,10 @@ Console.ConsoleViewFilter = class {
* @param {function()} filterChangedCallback
*/
constructor(filterChangedCallback) {
- this._showTargetMessagesCheckbox =
- new UI.ToolbarCheckbox(Common.UIString('Selected context only'), undefined, filterChangedCallback);
+ this._showTargetMessagesCheckbox = new UI.ToolbarCheckbox(
+ Common.UIString('Selected context only'),
+ Common.UIString('Only show messages from the current context (top, iframe, worker, extension)'),
+ filterChangedCallback);
this._filterChanged = filterChangedCallback;
this._messageURLFiltersSetting = Common.settings.createSetting('messageURLFilters', {});
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/consoleView.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698