Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(412)

Side by Side Diff: remoting/webapp/app_remoting/js/app_remoting_activity.js

Issue 1139543002: [Chromoting] Show any startup errors in the LoadingWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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.close(); 192 remoting.loadingWindow_.updateErrorMessage(
193 this.showErrorMessage_(error); 193 chrome.i18n.getMessage(error.getTag()));
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('Connection failed: ' + error.toString()); 202 console.error('Error: ' + 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 })();
OLDNEW
« no previous file with comments | « no previous file | remoting/webapp/base/js/message_window.js » ('j') | remoting/webapp/base/js/message_window.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698