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} |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 if (maybePosition !== -1) | 149 if (maybePosition !== -1) |
150 position = maybePosition; | 150 position = maybePosition; |
151 | 151 |
152 // Opens the audio player panel. | 152 // Opens the audio player panel. |
153 return new Promise(function(fulfill, reject) { | 153 return new Promise(function(fulfill, reject) { |
154 var urls = util.entriesToURLs(audioEntries); | 154 var urls = util.entriesToURLs(audioEntries); |
155 audioPlayer.launch({items: urls, position: position}, reopen, fulfill); | 155 audioPlayer.launch({items: urls, position: position}, reopen, fulfill); |
156 }); | 156 }); |
157 }).then(function() { | 157 }).then(function() { |
158 audioPlayer.setIcon('icons/audio-player-64.png'); | 158 audioPlayer.setIcon('icons/audio-player-64.png'); |
159 AppWindowWrapper.focusOnDesktop(audioPlayer.rawAppWindow); | 159 audioPlayer.rawAppWindow.focus(); |
160 }).catch(function(error) { | 160 }).catch(function(error) { |
161 console.error('Launch failed' + error.stack || error); | 161 console.error('Launch failed' + error.stack || error); |
162 return Promise.reject(error); | 162 return Promise.reject(error); |
163 }); | 163 }); |
164 } | 164 } |
165 | 165 |
166 // Register the test utils. | 166 // Register the test utils. |
167 test.util.registerRemoteTestUtils(); | 167 test.util.registerRemoteTestUtils(); |
OLD | NEW |