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

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

Issue 7273089: Display active audio streams on chrome://media-internals. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Restructuring. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var audioStreams = new AudioStreamStore;
6 var audioStreamDiv;
7
8 // Receiving data for an audio stream.
9 // Add it to audioStreams and refresh.
10 onAudioUpdate = function(stream) {
11 audioStreams.addItem(stream);
12 audioStreamDiv.innerHTML = audioStreams.print();
13 };
14
15 // Receiving all data.
16 // Add it all to the appropriate stores and refresh.
17 onReceiveEverything = function(stuff) {
18 audioStreams.addItems(stuff.audio_streams);
19 audioStreamDiv.innerHTML = audioStreams.print();
20 };
21
22 // Removing an item from the appropriate store.
23 onItemDeleted = function(item) {
24 var type = item.split(".")[0];
25 switch (type) {
26 case "audio_streams" :
scherkus (not reviewing) 2011/07/07 20:57:30 nit: remove extra space
Scott Franklin 2011/07/09 00:33:22 Done.
27 audioStreams.removeItem(item);
28 audioStreamDiv.innerHTML = audioStreams.print();
29 break;
30 }
31 };
32
33 window.onload = function() {
34 audioStreamDiv = document.getElementById('audio-streams');
35
36 // Get information about all currently active media.
37 chrome.send('getEverything');
38 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698