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

Unified Diff: chrome/browser/resources/media_internals/disjoint_range_set.js

Issue 7479005: Add charts to the resource data section of chrome://media-internals. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Adding a <table> and responding to other feedback. Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/media_internals/disjoint_range_set.js
diff --git a/chrome/browser/resources/media_internals/disjoint_range_set.js b/chrome/browser/resources/media_internals/disjoint_range_set.js
index cff8f6922a6af2cfb0b8987078519a01139e3d64..abf27339cc51ae28bbcc79e1356cb45dfbfebcaa 100644
--- a/chrome/browser/resources/media_internals/disjoint_range_set.js
+++ b/chrome/browser/resources/media_internals/disjoint_range_set.js
@@ -125,7 +125,18 @@ cr.define('media', function() {
});
return results;
- }
+ },
+
+ /**
+ * Finds the maximum value present in any of the contained ranges.
+ * @return {int} The maximum value contained by this DisjointRangeSet.
+ */
+ max: function() {
+ var max = -Infinity;
+ for (var start in this.ranges_)
+ max = Math.max(max, this.ranges_[start]);
+ return max;
+ },
};
return {

Powered by Google App Engine
This is Rietveld 408576698