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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js

Issue 2895733002: DevTools: remove unused UI related code (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
Index: third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
index 666a36e1fa67919496f3aed16d3ba24142fd4533..7fadfb5e10f7a69dbd82b1b17789e1a4e12c0b7e 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/FilterBar.js
@@ -137,12 +137,6 @@ UI.FilterBar = class extends UI.HBox {
}
};
-UI.FilterBar.FilterBarState = {
- Inactive: 'inactive',
- Active: 'active',
- Shown: 'on'
-};
luoe 2017/05/22 17:50:47 Added: https://codereview.chromium.org/33143002 Re
-
/**
* @interface
* @extends {Common.EventTarget}
@@ -452,101 +446,6 @@ UI.NamedBitSetFilterUI.ALL_TYPES = 'all';
* @implements {UI.FilterUI}
* @unrestricted
*/
-UI.ComboBoxFilterUI = class extends Common.Object {
luoe 2017/05/22 17:50:47 Added: https://codereview.chromium.org/33143002 Re
- /**
- * @param {!Array.<!{value: string, label: string, title: string, default:(boolean|undefined)}>} options
- * @param {string=} label
- * @param {!Common.Setting=} setting
- */
- constructor(options, label, setting) {
- super();
- this._setting = setting;
- this._toolbar = new UI.Toolbar('');
- this._filterComboBox = new UI.ToolbarComboBox(this._filterChanged.bind(this));
- this._toolbar.appendToolbarItem(this._filterComboBox);
-
- this._options = options;
- for (var i = 0; i < options.length; ++i) {
- var filterOption = options[i];
- var option = this._filterComboBox.createOption(filterOption.label, filterOption.title, filterOption.value);
- this._filterComboBox.addOption(option);
- if (setting && setting.get() === filterOption.value)
- this._filterComboBox.setSelectedIndex(i);
- }
-
- if (setting)
- setting.addChangeListener(this._settingChanged, this);
- }
-
- /**
- * @override
- * @return {boolean}
- */
- isActive() {
- var option = this._options[this._filterComboBox.selectedIndex()];
- return !option || !option.default;
- }
-
- /**
- * @override
- * @return {!Element}
- */
- element() {
- return this._toolbar.element;
- }
-
- /**
- * @return {string}
- */
- value() {
- return this._options[this._filterComboBox.selectedIndex()].value;
- }
-
- /**
- * @param {number} index
- */
- setSelectedIndex(index) {
- this._filterComboBox.setSelectedIndex(index);
- }
-
- /**
- * @return {number}
- */
- selectedIndex(index) {
- return this._filterComboBox.selectedIndex();
- }
-
- _settingChanged() {
- if (this._muteSettingListener)
- return;
-
- var value = this._setting.get();
- for (var i = 0; i < this._options.length; ++i) {
- if (value === this._options[i].value) {
- this._filterComboBox.setSelectedIndex(i);
- break;
- }
- }
- }
-
- /**
- * @param {!Event} event
- */
- _filterChanged(event) {
- var option = this._options[this._filterComboBox.selectedIndex()];
- if (this._setting) {
- this._muteSettingListener = true;
- this._setting.set(option.value);
- this._muteSettingListener = false;
- }
- this.dispatchEventToListeners(UI.FilterUI.Events.FilterChanged, null);
- }
-};
-
-/**
- * @implements {UI.FilterUI}
- * @unrestricted
- */
UI.CheckboxFilterUI = class extends Common.Object {
/**
* @param {string} className

Powered by Google App Engine
This is Rietveld 408576698