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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/EventListenersWidget.js

Issue 2678623002: DevTools: pass title when creating settings (Closed)
Patch Set: ac 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/elements/EventListenersWidget.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/EventListenersWidget.js b/third_party/WebKit/Source/devtools/front_end/elements/EventListenersWidget.js
index 4e20c8dcff0ca9982e9a85b2ef4891a950d69d0a..606bf91391084003e410f9ae4d0daba1a9f570f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/EventListenersWidget.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/EventListenersWidget.js
@@ -44,15 +44,16 @@ Elements.EventListenersWidget = class extends UI.ThrottledWidget {
this._dispatchFilterBySetting.addChangeListener(this.update.bind(this));
this._showFrameworkListenersSetting = Common.settings.createSetting('showFrameowkrListeners', true);
+ this._showFrameworkListenersSetting.setTitle(Common.UIString('Framework listeners'));
this._showFrameworkListenersSetting.addChangeListener(this._showFrameworkListenersChanged.bind(this));
this._eventListenersView = new EventListeners.EventListenersView(this.element, this.update.bind(this));
var refreshButton = new UI.ToolbarButton(Common.UIString('Refresh'), 'largeicon-refresh');
refreshButton.addEventListener(UI.ToolbarButton.Events.Click, this.update.bind(this));
this._toolbarItems.push(refreshButton);
- this._toolbarItems.push(new UI.ToolbarCheckbox(
- Common.UIString('Ancestors'), Common.UIString('Show listeners on the ancestors'),
- this._showForAncestorsSetting));
+ this._toolbarItems.push(new UI.ToolbarSettingCheckbox(
+ this._showForAncestorsSetting, Common.UIString('Show listeners on the ancestors'),
+ Common.UIString('Ancestors')));
var dispatchFilter = new UI.ToolbarComboBox(this._onDispatchFilterTypeChanged.bind(this));
/**
@@ -72,9 +73,8 @@ Elements.EventListenersWidget = class extends UI.ThrottledWidget {
this, Common.UIString('Blocking'), Elements.EventListenersWidget.DispatchFilterBy.Blocking);
dispatchFilter.setMaxWidth(200);
this._toolbarItems.push(dispatchFilter);
- this._toolbarItems.push(new UI.ToolbarCheckbox(
- Common.UIString('Framework listeners'), Common.UIString('Resolve event listeners bound with framework'),
- this._showFrameworkListenersSetting));
+ this._toolbarItems.push(new UI.ToolbarSettingCheckbox(
+ this._showFrameworkListenersSetting, Common.UIString('Resolve event listeners bound with framework')));
UI.context.addFlavorChangeListener(SDK.DOMNode, this.update, this);
this.update();

Powered by Google App Engine
This is Rietveld 408576698