OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * A SourceRow represents the row corresponding to a single SourceEntry | 6 * A SourceRow represents the row corresponding to a single SourceEntry |
7 * displayed by the EventsView. | 7 * displayed by the EventsView. |
8 * | 8 * |
9 * @constructor | 9 * @constructor |
10 */ | 10 */ |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Check source ID, if needed. | 176 // Check source ID, if needed. |
177 if (filter.id) { | 177 if (filter.id) { |
178 if (filter.id.indexOf(this.sourceEntry_.getSourceId() + '') == -1) | 178 if (filter.id.indexOf(this.sourceEntry_.getSourceId() + '') == -1) |
179 return false; | 179 return false; |
180 } | 180 } |
181 | 181 |
182 if (filter.text == '') | 182 if (filter.text == '') |
183 return true; | 183 return true; |
184 | 184 |
185 var filterText = filter.text; | 185 var filterText = filter.text; |
186 var entryText = this.sourceEntry_.PrintEntriesAsText().toLowerCase(); | 186 var entryText = this.sourceEntry_.printAsText().toLowerCase(); |
187 | 187 |
188 return entryText.indexOf(filterText) != -1; | 188 return entryText.indexOf(filterText) != -1; |
189 }; | 189 }; |
190 | 190 |
191 SourceRow.prototype.isSelected = function() { | 191 SourceRow.prototype.isSelected = function() { |
192 return this.isSelected_; | 192 return this.isSelected_; |
193 }; | 193 }; |
194 | 194 |
195 SourceRow.prototype.setSelected = function(isSelected) { | 195 SourceRow.prototype.setSelected = function(isSelected) { |
196 if (isSelected == this.isSelected()) | 196 if (isSelected == this.isSelected()) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 */ | 275 */ |
276 SourceRow.prototype.moveAfter = function(entry) { | 276 SourceRow.prototype.moveAfter = function(entry) { |
277 this.row_.parentNode.insertBefore(this.row_, entry.row_.nextSibling); | 277 this.row_.parentNode.insertBefore(this.row_, entry.row_.nextSibling); |
278 }; | 278 }; |
279 | 279 |
280 SourceRow.prototype.remove = function() { | 280 SourceRow.prototype.remove = function() { |
281 this.setSelected(false); | 281 this.setSelected(false); |
282 this.setIsMatchedByFilter(false); | 282 this.setIsMatchedByFilter(false); |
283 this.row_.parentNode.removeChild(this.row_); | 283 this.row_.parentNode.removeChild(this.row_); |
284 }; | 284 }; |
OLD | NEW |