| 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 'host screen' for Chromoting. | 7 * Functions related to the 'host screen' for Chromoting. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 remoting.setMode(remoting.AppMode.HOME); | 114 remoting.setMode(remoting.AppMode.HOME); |
| 115 } else { | 115 } else { |
| 116 remoting.setMode(remoting.AppMode.HOST_SHARE_FINISHED); | 116 remoting.setMode(remoting.AppMode.HOST_SHARE_FINISHED); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 remoting.hostSession.removePlugin(); | 119 remoting.hostSession.removePlugin(); |
| 120 | 120 |
| 121 } else if (state == remoting.HostSession.State.ERROR) { | 121 } else if (state == remoting.HostSession.State.ERROR) { |
| 122 console.error('Host plugin state: ERROR'); | 122 console.error('Host plugin state: ERROR'); |
| 123 showShareError_(remoting.Error.UNEXPECTED); | 123 showShareError_(remoting.Error.UNEXPECTED); |
| 124 } else if (state == remoting.HostSession.State.INVALID_DOMAIN_ERROR) { |
| 125 console.error('Host plugin state: INVALID_DOMAIN_ERROR'); |
| 126 showShareError_(remoting.Error.INVALID_HOST_DOMAIN); |
| 124 } else { | 127 } else { |
| 125 console.error('Unknown state -> ' + state); | 128 console.error('Unknown state -> ' + state); |
| 126 } | 129 } |
| 127 } | 130 } |
| 128 | 131 |
| 129 /** | 132 /** |
| 130 * This is the callback that the host plugin invokes to indicate that there | 133 * This is the callback that the host plugin invokes to indicate that there |
| 131 * is additional debug log info to display. | 134 * is additional debug log info to display. |
| 132 * @param {string} msg The message (which will not be localized) to be logged. | 135 * @param {string} msg The message (which will not be localized) to be logged. |
| 133 */ | 136 */ |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 * @return {void} Nothing. | 267 * @return {void} Nothing. |
| 265 */ | 268 */ |
| 266 function onNatTraversalPolicyChanged_(enabled) { | 269 function onNatTraversalPolicyChanged_(enabled) { |
| 267 var natBox = document.getElementById('nat-box'); | 270 var natBox = document.getElementById('nat-box'); |
| 268 if (enabled) { | 271 if (enabled) { |
| 269 natBox.classList.add('traversal-enabled'); | 272 natBox.classList.add('traversal-enabled'); |
| 270 } else { | 273 } else { |
| 271 natBox.classList.remove('traversal-enabled'); | 274 natBox.classList.remove('traversal-enabled'); |
| 272 } | 275 } |
| 273 } | 276 } |
| OLD | NEW |