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

Unified Diff: chrome/browser/resources/net_internals/events_view.js

Issue 8890016: Make source_dependencies in about:net-internals clickable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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: chrome/browser/resources/net_internals/events_view.js
===================================================================
--- chrome/browser/resources/net_internals/events_view.js (revision 112998)
+++ chrome/browser/resources/net_internals/events_view.js (working copy)
@@ -528,13 +528,20 @@
/**
* If |params| includes a query, replaces the current filter and unselects.
- * all items.
+ * all items. If it includes a selection, tries to select the relevant
+ * item.
*/
setParameters: function(params) {
if (params.q) {
this.unselectAll_();
this.setFilterText_(params.q);
}
+
+ if (params.s) {
+ var sourceRow = this.sourceIdToRowMap_[params.s];
+ if (sourceRow)
+ sourceRow.setSelected(true);
+ }
},
/**
@@ -566,7 +573,15 @@
this.toggleSortMethod_('desc');
},
- modifySelectionArray: function(sourceRow, addToSelection) {
+ /**
+ * Modifies the map of selected rows to include the on with |sourceId|, if
eroman 2011/12/08 22:21:06 typo: "the one with". also nit: "include/exclude"
mmenke 2011/12/08 22:28:37 Fixed.
+ * present. Does not modify checkboxes or the LogView. Should only be
+ * called by a SourceRow in response to its selection state changing.
+ */
+ modifySelectionArray: function(sourceId, addToSelection) {
+ var sourceRow = this.sourceIdToRowMap_[sourceId];
+ if (!sourceRow)
+ return;
// Find the index for |sourceEntry| in the current selection list.
var index = -1;
for (var i = 0; i < this.currentSelectedRows_.length; ++i) {
@@ -588,8 +603,8 @@
getSelectedSourceEntries_: function() {
var sourceEntries = [];
- for (var id in this.currentSelectedRows_) {
- sourceEntries.push(this.currentSelectedRows_[id].getSourceEntry());
+ for (var i = 0; i < this.currentSelectedRows_.length; ++i) {
+ sourceEntries.push(this.currentSelectedRows_[i].getSourceEntry());
}
return sourceEntries;
},

Powered by Google App Engine
This is Rietveld 408576698