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 * Number of runtime errors catched in the background page. | 8 * Number of runtime errors catched in the background page. |
9 * @type {number} | 9 * @type {number} |
10 */ | 10 */ |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 var audioPlayerHTML = | 757 var audioPlayerHTML = |
758 newAudioPlayerEnabled ? 'audio_player.html' : 'mediaplayer.html'; | 758 newAudioPlayerEnabled ? 'audio_player.html' : 'mediaplayer.html'; |
759 | 759 |
760 /** | 760 /** |
761 * Audio player window create options. | 761 * Audio player window create options. |
762 * @type {Object} | 762 * @type {Object} |
763 */ | 763 */ |
764 var audioPlayerCreateOptions = Object.freeze({ | 764 var audioPlayerCreateOptions = Object.freeze({ |
765 type: 'panel', | 765 type: 'panel', |
766 hidden: true, | 766 hidden: true, |
767 minHeight: newAudioPlayerEnabled ? 116 : (35 + 58), | 767 minHeight: |
| 768 newAudioPlayerEnabled ? |
| 769 (44 + 73) : // 44px: track, 73px: controller |
| 770 (35 + 58), // 35px: track, 58px: controller |
768 minWidth: newAudioPlayerEnabled ? 292 : 280, | 771 minWidth: newAudioPlayerEnabled ? 292 : 280, |
769 height: newAudioPlayerEnabled ? 116 : (35 + 58), // default collapsed | 772 height: newAudioPlayerEnabled ? (44 + 73) : (35 + 58), // collapsed |
770 width: newAudioPlayerEnabled ? 292 : 280, | 773 width: newAudioPlayerEnabled ? 292 : 280, |
771 }); | 774 }); |
772 | 775 |
773 audioPlayer = new SingletonAppWindowWrapper(audioPlayerHTML, | 776 audioPlayer = new SingletonAppWindowWrapper(audioPlayerHTML, |
774 audioPlayerCreateOptions); | 777 audioPlayerCreateOptions); |
775 callback(); | 778 callback(); |
776 }); | 779 }); |
777 | 780 |
778 /** | 781 /** |
779 * Launches the audio player. | 782 * Launches the audio player. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 contexts: ['launcher'], | 915 contexts: ['launcher'], |
913 title: str('NEW_WINDOW_BUTTON_LABEL') | 916 title: str('NEW_WINDOW_BUTTON_LABEL') |
914 }); | 917 }); |
915 }; | 918 }; |
916 | 919 |
917 /** | 920 /** |
918 * Singleton instance of Background. | 921 * Singleton instance of Background. |
919 * @type {Background} | 922 * @type {Background} |
920 */ | 923 */ |
921 window.background = new Background(); | 924 window.background = new Background(); |
OLD | NEW |