OLD | NEW |
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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** | 7 /** |
8 * TODO(mtomasz): Rewrite the entire audio player. | 8 * TODO(mtomasz): Rewrite the entire audio player. |
9 * | 9 * |
10 * @param {HTMLElement} container Container element. | 10 * @param {HTMLElement} container Container element. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 /** | 63 /** |
64 * Initial load method (static). | 64 * Initial load method (static). |
65 */ | 65 */ |
66 AudioPlayer.load = function() { | 66 AudioPlayer.load = function() { |
67 document.ondragstart = function(e) { e.preventDefault() }; | 67 document.ondragstart = function(e) { e.preventDefault() }; |
68 | 68 |
69 // TODO(mtomasz): Consider providing an exact size icon, instead of relying | 69 // TODO(mtomasz): Consider providing an exact size icon, instead of relying |
70 // on downsampling by ash. | 70 // on downsampling by ash. |
71 chrome.app.window.current().setIcon('images/media/2x/audio_player.png'); | 71 chrome.app.window.current().setIcon( |
| 72 'foreground/images/media/2x/audio_player.png'); |
72 | 73 |
73 AudioPlayer.instance = | 74 AudioPlayer.instance = |
74 new AudioPlayer(document.querySelector('.audio-player')); | 75 new AudioPlayer(document.querySelector('.audio-player')); |
75 reload(); | 76 reload(); |
76 }; | 77 }; |
77 | 78 |
78 util.addPageLoadHandler(AudioPlayer.load); | 79 util.addPageLoadHandler(AudioPlayer.load); |
79 | 80 |
80 /** | 81 /** |
81 * Unload the player. | 82 * Unload the player. |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 * Restore the state after page/app reload. | 616 * Restore the state after page/app reload. |
616 */ | 617 */ |
617 FullWindowAudioControls.prototype.restorePlayState = function() { | 618 FullWindowAudioControls.prototype.restorePlayState = function() { |
618 if (this.restoreWhenLoaded_) { | 619 if (this.restoreWhenLoaded_) { |
619 this.restoreWhenLoaded_ = false; // This should only work once. | 620 this.restoreWhenLoaded_ = false; // This should only work once. |
620 if (this.decodeState()) | 621 if (this.decodeState()) |
621 return; | 622 return; |
622 } | 623 } |
623 this.play(); | 624 this.play(); |
624 }; | 625 }; |
OLD | NEW |