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

Side by Side Diff: chrome/browser/resources/file_manager/js/mock_chrome.js

Issue 10917188: Make Chrome OS Audio Player survive page reload and OS restart. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed debug trace Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 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 function MockEventSource() { 5 function MockEventSource() {
6 this.listeners_ = []; 6 this.listeners_ = [];
7 } 7 }
8 8
9 /** 9 /**
10 * Add a listener. 10 * Add a listener.
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 /** 807 /**
808 * Mock object for |chrome.mediaPlayerPrivate|. 808 * Mock object for |chrome.mediaPlayerPrivate|.
809 */ 809 */
810 chrome.mediaPlayerPrivate = { 810 chrome.mediaPlayerPrivate = {
811 811
812 onPlaylistChanged: new MockEventSource(), 812 onPlaylistChanged: new MockEventSource(),
813 813
814 onTogglePlayState: new MockEventSource(), 814 onTogglePlayState: new MockEventSource(),
815 815
816 onNextTrack: new MockEventSource(),
817
818 onPrevTrack: new MockEventSource(),
819
816 play: function(urls, position) { 820 play: function(urls, position) {
817 this.playlist_ = { items: urls, position: position }; 821 this.playlist_ = { items: urls, position: position };
818 822
819 if (this.popup_) { 823 if (this.popup_) {
820 this.onPlaylistChanged.notify(); 824 this.onPlaylistChanged.notify();
821 return; 825 return;
822 } 826 }
823 827
824 // Using global document is OK for the test harness. 828 // Using global document is OK for the test harness.
825 this.popup_ = document.createElement('iframe'); 829 this.popup_ = document.createElement('iframe');
(...skipping 19 matching lines...) Expand all
845 849
846 setWindowHeight: function(height) { 850 setWindowHeight: function(height) {
847 this.popup_.style.height = height + 'px'; 851 this.popup_.style.height = height + 'px';
848 }, 852 },
849 853
850 closeWindow: function() { 854 closeWindow: function() {
851 this.popup_.parentNode.removeChild(this.popup_); 855 this.popup_.parentNode.removeChild(this.popup_);
852 this.popup_ = null; 856 this.popup_ = null;
853 } 857 }
854 }; 858 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/media/video_player.js ('k') | chrome/browser/resources/file_manager/mediaplayer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698