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

Side by Side Diff: chrome/browser/resources/net_internals/source_row.js

Issue 7531028: net-internals: Fix regression that breaks things when a filter is active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: oops Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698