| 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: 48 + 73, // 48px: track, 73px: controller | 24 minHeight: 48 + 96, // 48px: track, 96px: controller |
| 25 minWidth: 292, | 25 minWidth: 280, |
| 26 height: 48 + 73, // collapsed | 26 height: 48 + 96, // collapsed |
| 27 width: 292 | 27 width: 280 |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * @constructor | 31 * @constructor |
| 32 * @extends {BackgroundBase} | 32 * @extends {BackgroundBase} |
| 33 */ | 33 */ |
| 34 function AudioPlayerBackground() { | 34 function AudioPlayerBackground() { |
| 35 BackgroundBase.call(this); | 35 BackgroundBase.call(this); |
| 36 } | 36 } |
| 37 | 37 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 audioPlayer.setIcon(AUDIO_PLAYER_ICON); | 121 audioPlayer.setIcon(AUDIO_PLAYER_ICON); |
| 122 audioPlayer.rawAppWindow.focus(); | 122 audioPlayer.rawAppWindow.focus(); |
| 123 return AUDIO_PLAYER_APP_URL; | 123 return AUDIO_PLAYER_APP_URL; |
| 124 }).catch(function(error) { | 124 }).catch(function(error) { |
| 125 console.error('Launch failed' + error.stack || error); | 125 console.error('Launch failed' + error.stack || error); |
| 126 return Promise.reject(error); | 126 return Promise.reject(error); |
| 127 }); | 127 }); |
| 128 } | 128 } |
| 129 | 129 |
| 130 background.setLaunchHandler(open); | 130 background.setLaunchHandler(open); |
| OLD | NEW |