| OLD | NEW |
| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 } else if (remoting.clientSession.error == | 231 } else if (remoting.clientSession.error == |
| 232 remoting.ClientSession.ConnectionError.SESSION_REJECTED) { | 232 remoting.ClientSession.ConnectionError.SESSION_REJECTED) { |
| 233 showConnectError_(remoting.Error.INVALID_ACCESS_CODE); | 233 showConnectError_(remoting.Error.INVALID_ACCESS_CODE); |
| 234 } else if (remoting.clientSession.error == | 234 } else if (remoting.clientSession.error == |
| 235 remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL) { | 235 remoting.ClientSession.ConnectionError.INCOMPATIBLE_PROTOCOL) { |
| 236 showConnectError_(remoting.Error.INCOMPATIBLE_PROTOCOL); | 236 showConnectError_(remoting.Error.INCOMPATIBLE_PROTOCOL); |
| 237 } else if (remoting.clientSession.error == | 237 } else if (remoting.clientSession.error == |
| 238 remoting.ClientSession.ConnectionError.NETWORK_FAILURE) { | 238 remoting.ClientSession.ConnectionError.NETWORK_FAILURE) { |
| 239 showConnectError_(remoting.Error.NETWORK_FAILURE); | 239 showConnectError_(remoting.Error.NETWORK_FAILURE); |
| 240 } else if (remoting.clientSession.error == | 240 } else if (remoting.clientSession.error == |
| 241 remoting.ClientSession.ConnectionError.HOST_IS_DISABLED) { | 241 remoting.ClientSession.ConnectionError.HOST_OVERLOAD) { |
| 242 showConnectError_(remoting.Error.HOST_IS_DISABLED); | 242 showConnectError_(remoting.Error.HOST_OVERLOAD); |
| 243 } else { | 243 } else { |
| 244 showConnectError_(remoting.Error.GENERIC); | 244 showConnectError_(remoting.Error.GENERIC); |
| 245 } | 245 } |
| 246 | 246 |
| 247 if (clearPin) { | 247 if (clearPin) { |
| 248 document.getElementById('pin-entry').value = ''; | 248 document.getElementById('pin-entry').value = ''; |
| 249 } | 249 } |
| 250 | 250 |
| 251 } else { | 251 } else { |
| 252 console.error('Unexpected client plugin state: ' + newState); | 252 console.error('Unexpected client plugin state: ' + newState); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 pin, 'spake2_hmac,spake2_plain', remoting.hostId, | 509 pin, 'spake2_hmac,spake2_plain', remoting.hostId, |
| 510 /** @type {string} */ (remoting.oauth2.getCachedEmail()), | 510 /** @type {string} */ (remoting.oauth2.getCachedEmail()), |
| 511 remoting.ClientSession.Mode.ME2ME, onClientStateChange_); | 511 remoting.ClientSession.Mode.ME2ME, onClientStateChange_); |
| 512 remoting.clientSession.createPluginAndConnect( | 512 remoting.clientSession.createPluginAndConnect( |
| 513 document.getElementById('session-mode'), | 513 document.getElementById('session-mode'), |
| 514 token); | 514 token); |
| 515 } else { | 515 } else { |
| 516 showConnectError_(remoting.Error.AUTHENTICATION_FAILED); | 516 showConnectError_(remoting.Error.AUTHENTICATION_FAILED); |
| 517 } | 517 } |
| 518 } | 518 } |
| OLD | NEW |