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

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: Fix missed variable name change 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,16 @@
this.toggleSortMethod_('desc');
},
- modifySelectionArray: function(sourceRow, addToSelection) {
+ /**
+ * Modifies the map of selected rows to include/exclude the one with
+ * |sourceId|, if 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 +604,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;
},
« no previous file with comments | « chrome/browser/resources/net_internals/events_view.html ('k') | chrome/browser/resources/net_internals/log_view_painter.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698