| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** @suppress {duplicate} */ | 5 /** @suppress {duplicate} */ |
| 6 var remoting = remoting || {}; | 6 var remoting = remoting || {}; |
| 7 | 7 |
| 8 /** | 8 /** |
| 9 * Type definition for the RunApplicationResponse returned by the API. | 9 * Type definition for the RunApplicationResponse returned by the API. |
| 10 * @typedef {{ | 10 * @typedef {{ |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 } else { | 182 } else { |
| 183 this.showErrorMessage_(error); | 183 this.showErrorMessage_(error); |
| 184 } | 184 } |
| 185 this.cleanup_(); | 185 this.cleanup_(); |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 /** | 188 /** |
| 189 * @param {!remoting.Error} error | 189 * @param {!remoting.Error} error |
| 190 */ | 190 */ |
| 191 remoting.AppRemotingActivity.prototype.onConnectionFailed = function(error) { | 191 remoting.AppRemotingActivity.prototype.onConnectionFailed = function(error) { |
| 192 remoting.loadingWindow_.updateErrorMessage( | 192 remoting.LoadingWindow.close(); |
| 193 chrome.i18n.getMessage(error.getTag())); | 193 this.showErrorMessage_(error); |
| 194 this.cleanup_(); | 194 this.cleanup_(); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 /** | 197 /** |
| 198 * @param {!remoting.Error} error The error to be localized and displayed. | 198 * @param {!remoting.Error} error The error to be localized and displayed. |
| 199 * @private | 199 * @private |
| 200 */ | 200 */ |
| 201 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { | 201 remoting.AppRemotingActivity.prototype.showErrorMessage_ = function(error) { |
| 202 console.error('Error: ' + error.toString()); | 202 console.error('Connection failed: ' + error.toString()); |
| 203 remoting.MessageWindow.showErrorMessage( | 203 remoting.MessageWindow.showErrorMessage( |
| 204 remoting.app.getApplicationName(), | 204 remoting.app.getApplicationName(), |
| 205 chrome.i18n.getMessage(error.getTag())); | 205 chrome.i18n.getMessage(error.getTag())); |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 })(); | 208 })(); |
| OLD | NEW |