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

Side by Side Diff: chrome/browser/resources/media_internals/event_list.js

Issue 10332082: Remove reporting statistics reporting from chrome://media-internals and fix event logging. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: fix year Created 8 years, 7 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 | media/base/media_log.h » ('j') | media/base/media_log.cc » ('J')
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) 2012 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 cr.define('media', function() { 5 cr.define('media', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * This class holds a list of MediaLogEvents. 9 * This class holds a list of MediaLogEvents.
10 * It inherits from <li> and contains a tabular list of said events, 10 * It inherits from <li> and contains a tabular list of said events,
11 * the time at which they occurred, and their parameters. 11 * the time at which they occurred, and their parameters.
(...skipping 30 matching lines...) Expand all
42 */ 42 */
43 addEvent: function(event) { 43 addEvent: function(event) {
44 var timeInMs = event.time * 1000; // Work with milliseconds. 44 var timeInMs = event.time * 1000; // Work with milliseconds.
45 this.startTime_ = this.startTime_ || timeInMs; 45 this.startTime_ = this.startTime_ || timeInMs;
46 timeInMs -= this.startTime_; 46 timeInMs -= this.startTime_;
47 47
48 var row = document.createElement('tr'); 48 var row = document.createElement('tr');
49 row.appendChild(media.makeElement('td', timeInMs.toFixed(1))); 49 row.appendChild(media.makeElement('td', timeInMs.toFixed(1)));
50 row.appendChild(media.makeElement('td', event.type)); 50 row.appendChild(media.makeElement('td', event.type));
51 var params = []; 51 var params = [];
52 for (var i = 0; i < event.params.length; ++i) { 52 for (var key in event.params) {
53 params.push(i + ': ' + event.params[i]); 53 params.push(key + ': ' + event.params[key]);
54 } 54 }
55 55
56 row.appendChild(media.makeElement('td', params.join(', '))); 56 row.appendChild(media.makeElement('td', params.join(', ')));
57 this.table_.appendChild(row); 57 this.table_.appendChild(row);
58 } 58 }
59 }; 59 };
60 60
61 return { 61 return {
62 EventList: EventList 62 EventList: EventList
63 }; 63 };
64 }); 64 });
OLDNEW
« no previous file with comments | « no previous file | media/base/media_log.h » ('j') | media/base/media_log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698