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 'use strict'; | |
6 | |
7 /** | 5 /** |
8 * Icon of the audio player. | 6 * Icon of the audio player. |
9 * TODO(yoshiki): Consider providing an exact size icon, instead of relying | 7 * TODO(yoshiki): Consider providing an exact size icon, instead of relying |
10 * on downsampling by ash. | 8 * on downsampling by ash. |
11 * | 9 * |
12 * @type {string} | 10 * @type {string} |
13 * @const | 11 * @const |
14 */ | 12 */ |
15 var AUDIO_PLAYER_ICON = 'audio_player/icons/audio-player-64.png'; | 13 var AUDIO_PLAYER_ICON = 'audio_player/icons/audio-player-64.png'; |
16 | 14 |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 audioPlayer.launch({items: urls, position: position}, reopen, fulfill); | 155 audioPlayer.launch({items: urls, position: position}, reopen, fulfill); |
158 }); | 156 }); |
159 }).then(function() { | 157 }).then(function() { |
160 audioPlayer.setIcon('icons/audio-player-64.png'); | 158 audioPlayer.setIcon('icons/audio-player-64.png'); |
161 AppWindowWrapper.focusOnDesktop(audioPlayer.rawAppWindow); | 159 AppWindowWrapper.focusOnDesktop(audioPlayer.rawAppWindow); |
162 }).catch(function(error) { | 160 }).catch(function(error) { |
163 console.error('Launch failed' + error.stack || error); | 161 console.error('Launch failed' + error.stack || error); |
164 return Promise.reject(error); | 162 return Promise.reject(error); |
165 }); | 163 }); |
166 } | 164 } |
OLD | NEW |