| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 /** | 5 /** |
| 6 * @unrestricted | 6 * @unrestricted |
| 7 */ | 7 */ |
| 8 Timeline.EventsTimelineTreeView = class extends Timeline.TimelineTreeView { | 8 Timeline.EventsTimelineTreeView = class extends Timeline.TimelineTreeView { |
| 9 /** | 9 /** |
| 10 * @param {!Array<!TimelineModel.TimelineModelFilter>} filters | 10 * @param {!Array<!TimelineModel.TimelineModelFilter>} filters |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 return this._filters; | 145 return this._filters; |
| 146 } | 146 } |
| 147 | 147 |
| 148 /** | 148 /** |
| 149 * @param {!UI.Toolbar} toolbar | 149 * @param {!UI.Toolbar} toolbar |
| 150 */ | 150 */ |
| 151 populateToolbar(toolbar) { | 151 populateToolbar(toolbar) { |
| 152 var durationFilterUI = new UI.ToolbarComboBox(durationFilterChanged.bind(thi
s)); | 152 var durationFilterUI = new UI.ToolbarComboBox(durationFilterChanged.bind(thi
s)); |
| 153 for (var durationMs of Timeline.EventsTimelineTreeView.Filters._durationFilt
erPresetsMs) { | 153 for (var durationMs of Timeline.EventsTimelineTreeView.Filters._durationFilt
erPresetsMs) { |
| 154 durationFilterUI.addOption(durationFilterUI.createOption( | 154 durationFilterUI.addOption(durationFilterUI.createOption( |
| 155 durationMs ? Common.UIString('\u2265 %d\u2009ms', durationMs) : Common
.UIString('All'), | 155 durationMs ? Common.UIString('\u2265 %d\xa0ms', durationMs) : Common.U
IString('All'), |
| 156 durationMs ? Common.UIString('Hide records shorter than %d\u2009ms', d
urationMs) : | 156 durationMs ? Common.UIString('Hide records shorter than %d\xa0ms', dur
ationMs) : |
| 157 Common.UIString('Show all records'), | 157 Common.UIString('Show all records'), |
| 158 String(durationMs))); | 158 String(durationMs))); |
| 159 } | 159 } |
| 160 toolbar.appendToolbarItem(durationFilterUI); | 160 toolbar.appendToolbarItem(durationFilterUI); |
| 161 | 161 |
| 162 var categoryFiltersUI = {}; | 162 var categoryFiltersUI = {}; |
| 163 var categories = Timeline.TimelineUIUtils.categories(); | 163 var categories = Timeline.TimelineUIUtils.categories(); |
| 164 for (var categoryName in categories) { | 164 for (var categoryName in categories) { |
| 165 var category = categories[categoryName]; | 165 var category = categories[categoryName]; |
| 166 if (!category.visible) | 166 if (!category.visible) |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 this.dispatchEventToListeners(Timeline.EventsTimelineTreeView.Filters.Events
.FilterChanged); | 198 this.dispatchEventToListeners(Timeline.EventsTimelineTreeView.Filters.Events
.FilterChanged); |
| 199 } | 199 } |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 Timeline.EventsTimelineTreeView.Filters._durationFilterPresetsMs = [0, 1, 15]; | 202 Timeline.EventsTimelineTreeView.Filters._durationFilterPresetsMs = [0, 1, 15]; |
| 203 | 203 |
| 204 /** @enum {symbol} */ | 204 /** @enum {symbol} */ |
| 205 Timeline.EventsTimelineTreeView.Filters.Events = { | 205 Timeline.EventsTimelineTreeView.Filters.Events = { |
| 206 FilterChanged: Symbol('FilterChanged') | 206 FilterChanged: Symbol('FilterChanged') |
| 207 }; | 207 }; |
| OLD | NEW |