OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
6 * Icon of the audio player. | 6 * Icon of the audio player. |
7 * TODO(yoshiki): Consider providing an exact size icon, instead of relying | 7 * TODO(yoshiki): Consider providing an exact size icon, instead of relying |
8 * on downsampling by ash. | 8 * on downsampling by ash. |
9 * | 9 * |
10 * @type {string} | 10 * @type {string} |
11 * @const | 11 * @const |
12 */ | 12 */ |
13 var AUDIO_PLAYER_ICON = 'icons/audio-player-64.png'; | 13 var AUDIO_PLAYER_ICON = 'icons/audio-player-64.png'; |
14 | 14 |
15 var AUDIO_PLAYER_APP_URL = 'audio_player.html'; | 15 var AUDIO_PLAYER_APP_URL = 'audio_player.html'; |
16 | 16 |
17 /** | 17 /** |
18 * Configuration of the audio player panel. | 18 * Configuration of the audio player panel. |
19 * @type {Object} | 19 * @type {Object} |
20 */ | 20 */ |
21 var audioPlayerCreateOptions = { | 21 var audioPlayerCreateOptions = { |
22 id: 'audio-player', | 22 id: 'audio-player', |
23 type: 'panel', | 23 type: 'panel', |
24 minHeight: 4 + 48 + 96, // 4px: border-top, 48px: track, 96px: controller | 24 minHeight: 4 + 48 + 96, // 4px: border-top, 48px: track, 96px: controller |
25 minWidth: 280, | 25 minWidth: 320, |
26 height: 4 + 48 + 96, // collapsed | 26 height: 4 + 48 + 96, // collapsed |
27 width: 280, | 27 width: 320, |
28 frame: { | 28 frame: { |
29 color: '#fafafa' | 29 color: '#fafafa' |
30 } | 30 } |
31 }; | 31 }; |
32 | 32 |
33 /** | 33 /** |
34 * @constructor | 34 * @constructor |
35 * @extends {BackgroundBase} | 35 * @extends {BackgroundBase} |
36 */ | 36 */ |
37 function AudioPlayerBackground() { | 37 function AudioPlayerBackground() { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 audioPlayer.setIcon(AUDIO_PLAYER_ICON); | 124 audioPlayer.setIcon(AUDIO_PLAYER_ICON); |
125 audioPlayer.rawAppWindow.focus(); | 125 audioPlayer.rawAppWindow.focus(); |
126 return AUDIO_PLAYER_APP_URL; | 126 return AUDIO_PLAYER_APP_URL; |
127 }).catch(function(error) { | 127 }).catch(function(error) { |
128 console.error('Launch failed' + error.stack || error); | 128 console.error('Launch failed' + error.stack || error); |
129 return Promise.reject(error); | 129 return Promise.reject(error); |
130 }); | 130 }); |
131 } | 131 } |
132 | 132 |
133 background.setLaunchHandler(open); | 133 background.setLaunchHandler(open); |
OLD | NEW |