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

Side by Side Diff: remoting/webapp/client_screen.js

Issue 9564025: Display correct error message when the client fails to establish P2P connection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/remoting.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 * @fileoverview 6 * @fileoverview
7 * Functions related to the 'client screen' for Chromoting. 7 * Functions related to the 'client screen' for Chromoting.
8 */ 8 */
9 9
10 'use strict'; 10 'use strict';
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 clearPin = false; 240 clearPin = false;
241 retryConnectOrReportOffline_(); 241 retryConnectOrReportOffline_();
242 } else if (remoting.clientSession.error == 242 } else if (remoting.clientSession.error ==
243 remoting.ClientSession.ConnectionError.SESSION_REJECTED) { 243 remoting.ClientSession.ConnectionError.SESSION_REJECTED) {
244 showConnectError_(remoting.Error.INVALID_ACCESS_CODE); 244 showConnectError_(remoting.Error.INVALID_ACCESS_CODE);
245 } else if (remoting.clientSession.error == 245 } else if (remoting.clientSession.error ==
246 remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL) { 246 remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL) {
247 showConnectError_(remoting.Error.INCOMPATIBLE_PROTOCOL); 247 showConnectError_(remoting.Error.INCOMPATIBLE_PROTOCOL);
248 } else if (remoting.clientSession.error == 248 } else if (remoting.clientSession.error ==
249 remoting.ClientSession.ConnectionError.NETWORK_FAILURE) { 249 remoting.ClientSession.ConnectionError.NETWORK_FAILURE) {
250 showConnectError_(remoting.Error.GENERIC); 250 showConnectError_(remoting.Error.NETWORK_FAILURE);
251 } else { 251 } else {
252 showConnectError_(remoting.Error.GENERIC); 252 showConnectError_(remoting.Error.GENERIC);
253 } 253 }
254 254
255 if (clearPin) { 255 if (clearPin) {
256 document.getElementById('pin-entry').value = ''; 256 document.getElementById('pin-entry').value = '';
257 } 257 }
258 258
259 } else { 259 } else {
260 console.error('Unexpected client plugin state: ' + newState); 260 console.error('Unexpected client plugin state: ' + newState);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 /** @type {string} */ (remoting.oauth2.getCachedEmail()), 502 /** @type {string} */ (remoting.oauth2.getCachedEmail()),
503 remoting.ClientSession.Mode.ME2ME, onClientStateChange_); 503 remoting.ClientSession.Mode.ME2ME, onClientStateChange_);
504 remoting.clientSession.createPluginAndConnect( 504 remoting.clientSession.createPluginAndConnect(
505 document.getElementById('session-mode'), 505 document.getElementById('session-mode'),
506 token); 506 token);
507 remoting.setScaleToFit(remoting.clientSession.getScaleToFit()); 507 remoting.setScaleToFit(remoting.clientSession.getScaleToFit());
508 } else { 508 } else {
509 showConnectError_(remoting.Error.AUTHENTICATION_FAILED); 509 showConnectError_(remoting.Error.AUTHENTICATION_FAILED);
510 } 510 }
511 } 511 }
OLDNEW
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/remoting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698