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 video player. | 6 * Icon of the video 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 reopen, | 125 reopen, |
126 fulfill.bind(null, videoPlayer)); | 126 fulfill.bind(null, videoPlayer)); |
127 }.wrap()); | 127 }.wrap()); |
128 }.wrap()).then(function(videoPlayer) { | 128 }.wrap()).then(function(videoPlayer) { |
129 var appWindow = videoPlayer.rawAppWindow; | 129 var appWindow = videoPlayer.rawAppWindow; |
130 | 130 |
131 if (chrome.test) | 131 if (chrome.test) |
132 appWindow.contentWindow.loadMockCastExtensionForTest = true; | 132 appWindow.contentWindow.loadMockCastExtensionForTest = true; |
133 | 133 |
134 videoPlayer.setIcon(ICON_IMAGE); | 134 videoPlayer.setIcon(ICON_IMAGE); |
135 AppWindowWrapper.focusOnDesktop(appWindow); | 135 appWindow.focus(); |
136 | 136 |
137 return windowId; | 137 return windowId; |
138 }.wrap()).catch(function(error) { | 138 }.wrap()).catch(function(error) { |
139 console.error('Launch failed' + error.stack || error); | 139 console.error('Launch failed' + error.stack || error); |
140 return Promise.reject(error); | 140 return Promise.reject(error); |
141 }.wrap()); | 141 }.wrap()); |
142 } | 142 } |
OLD | NEW |