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

Unified Diff: content/browser/resources/media/cache_entry.js

Issue 23536020: Adds cache and buffer graphs to the properties pane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed how tests and cr.js are loaded and interact Created 7 years, 3 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
« no previous file with comments | « no previous file | content/browser/resources/media/new/client_renderer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resources/media/cache_entry.js
diff --git a/content/browser/resources/media/cache_entry.js b/content/browser/resources/media/cache_entry.js
index 275a8c74a5021e9085ded7c53a658394e43f9746..e4b3f0d3e0568f864ba85fceea4c3ab98934fcab 100644
--- a/content/browser/resources/media/cache_entry.js
+++ b/content/browser/resources/media/cache_entry.js
@@ -176,6 +176,12 @@ cr.define('media', function() {
* this file.
*/
generateDetails: function() {
+ function makeElement(tag, content) {
+ var toReturn = document.createElement(tag);
+ toReturn.textContent = content;
+ return toReturn;
+ }
+
this.details_.id = this.key;
this.summaryText_.textContent = this.key || 'Unknown File';
@@ -188,8 +194,8 @@ cr.define('media', function() {
this.detailTable_.appendChild(body);
var headerRow = document.createElement('tr');
- headerRow.appendChild(media.makeElement('th', 'Read From Cache'));
- headerRow.appendChild(media.makeElement('th', 'Written To Cache'));
+ headerRow.appendChild(makeElement('th', 'Read From Cache'));
+ headerRow.appendChild(makeElement('th', 'Written To Cache'));
header.appendChild(headerRow);
var footerRow = document.createElement('tr');
@@ -209,8 +215,8 @@ cr.define('media', function() {
var length = Math.max(read.length, written.length);
for (var i = 0; i < length; i++) {
var row = document.createElement('tr');
- row.appendChild(media.makeElement('td', read[i] || ''));
- row.appendChild(media.makeElement('td', written[i] || ''));
+ row.appendChild(makeElement('td', read[i] || ''));
+ row.appendChild(makeElement('td', written[i] || ''));
body.appendChild(row);
}
« no previous file with comments | « no previous file | content/browser/resources/media/new/client_renderer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698