| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * It2MeService listens to incoming connections requests from Hangouts | 7 * It2MeService listens to incoming connections requests from Hangouts |
| 8 * and the webapp and creates a It2MeHelperChannel between them. | 8 * and the webapp and creates a It2MeHelperChannel between them. |
| 9 * It supports multiple helper sessions, but only a single helpee. | 9 * It supports multiple helper sessions, but only a single helpee. |
| 10 */ | 10 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * @implements {base.Disposable} | 21 * @implements {base.Disposable} |
| 22 */ | 22 */ |
| 23 remoting.It2MeService = function(appLauncher) { | 23 remoting.It2MeService = function(appLauncher) { |
| 24 /** | 24 /** |
| 25 * @type {remoting.AppLauncher} | 25 * @type {remoting.AppLauncher} |
| 26 * @private | 26 * @private |
| 27 */ | 27 */ |
| 28 this.appLauncher_ = appLauncher; | 28 this.appLauncher_ = appLauncher; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * @type {Array.<remoting.It2MeHelperChannel>} | 31 * @type {Array<remoting.It2MeHelperChannel>} |
| 32 * @private | 32 * @private |
| 33 */ | 33 */ |
| 34 this.helpers_ = []; | 34 this.helpers_ = []; |
| 35 | 35 |
| 36 /** @private */ | 36 /** @private */ |
| 37 this.helpee_ = null; | 37 this.helpee_ = null; |
| 38 | 38 |
| 39 this.onWebappConnectRef_ = this.onWebappConnect_.bind(this); | 39 this.onWebappConnectRef_ = this.onWebappConnect_.bind(this); |
| 40 this.onConnectExternalRef_ = this.onConnectExternal_.bind(this); | 40 this.onConnectExternalRef_ = this.onConnectExternal_.bind(this); |
| 41 }; | 41 }; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 } | 169 } |
| 170 | 170 |
| 171 console.log('Incoming helpee connection from Hangouts'); | 171 console.log('Incoming helpee connection from Hangouts'); |
| 172 this.helpee_ = new remoting.It2MeHelpeeChannel( | 172 this.helpee_ = new remoting.It2MeHelpeeChannel( |
| 173 hangoutPort, | 173 hangoutPort, |
| 174 new remoting.It2MeHostFacade(), | 174 new remoting.It2MeHostFacade(), |
| 175 new remoting.HostInstaller(), | 175 new remoting.HostInstaller(), |
| 176 this.onHelpeeChannelDisconnected.bind(this)); | 176 this.onHelpeeChannelDisconnected.bind(this)); |
| 177 this.helpee_.init(); | 177 this.helpee_.init(); |
| 178 }; | 178 }; |
| OLD | NEW |