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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js

Issue 2650543002: DevTools: render console level filter as drop box. (Closed)
Patch Set: rebase again 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @unrestricted 5 * @unrestricted
6 */ 6 */
7 Timeline.TimelineTreeView = class extends UI.VBox { 7 Timeline.TimelineTreeView = class extends UI.VBox {
8 constructor() { 8 constructor() {
9 super(); 9 super();
10 this.element.classList.add('timeline-tree-view'); 10 this.element.classList.add('timeline-tree-view');
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 this._textFilterUI = new UI.TextFilterUI(); 958 this._textFilterUI = new UI.TextFilterUI();
959 this._textFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, textFi lterChanged, this); 959 this._textFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, textFi lterChanged, this);
960 this._filterBar.addFilter(this._textFilterUI); 960 this._filterBar.addFilter(this._textFilterUI);
961 961
962 var durationOptions = []; 962 var durationOptions = [];
963 for (var durationMs of Timeline.EventsTimelineTreeView.Filters._durationFilt erPresetsMs) { 963 for (var durationMs of Timeline.EventsTimelineTreeView.Filters._durationFilt erPresetsMs) {
964 var durationOption = {}; 964 var durationOption = {};
965 if (!durationMs) { 965 if (!durationMs) {
966 durationOption.label = Common.UIString('All'); 966 durationOption.label = Common.UIString('All');
967 durationOption.title = Common.UIString('Show all records'); 967 durationOption.title = Common.UIString('Show all records');
968 durationOption.default = true;
968 } else { 969 } else {
969 durationOption.label = Common.UIString('\u2265 %dms', durationMs); 970 durationOption.label = Common.UIString('\u2265 %dms', durationMs);
970 durationOption.title = Common.UIString('Hide records shorter than %dms', durationMs); 971 durationOption.title = Common.UIString('Hide records shorter than %dms', durationMs);
971 } 972 }
972 durationOption.value = durationMs; 973 durationOption.value = String(durationMs);
973 durationOptions.push(durationOption); 974 durationOptions.push(durationOption);
974 } 975 }
975 var durationFilterUI = new UI.ComboBoxFilterUI(durationOptions); 976 var durationFilterUI = new UI.ComboBoxFilterUI(durationOptions);
976 durationFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, duration FilterChanged, this); 977 durationFilterUI.addEventListener(UI.FilterUI.Events.FilterChanged, duration FilterChanged, this);
977 this._filterBar.addFilter(durationFilterUI); 978 this._filterBar.addFilter(durationFilterUI);
978 979
979 var categoryFiltersUI = {}; 980 var categoryFiltersUI = {};
980 var categories = Timeline.TimelineUIUtils.categories(); 981 var categories = Timeline.TimelineUIUtils.categories();
981 for (var categoryName in categories) { 982 for (var categoryName in categories) {
982 var category = categories[categoryName]; 983 var category = categories[categoryName];
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 1147
1147 _onSelectionChanged() { 1148 _onSelectionChanged() {
1148 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha nged); 1149 this.dispatchEventToListeners(Timeline.TimelineStackView.Events.SelectionCha nged);
1149 } 1150 }
1150 }; 1151 };
1151 1152
1152 /** @enum {symbol} */ 1153 /** @enum {symbol} */
1153 Timeline.TimelineStackView.Events = { 1154 Timeline.TimelineStackView.Events = {
1154 SelectionChanged: Symbol('SelectionChanged') 1155 SelectionChanged: Symbol('SelectionChanged')
1155 }; 1156 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698