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 */ |
11 | 11 |
12 'use strict'; | 12 'use strict'; |
13 | 13 |
14 /** @suppress {duplicate} */ | 14 /** @suppress {duplicate} */ |
15 var remoting = remoting || {}; | 15 var remoting = remoting || {}; |
16 | 16 |
17 /** | 17 /** |
18 * @param {remoting.AppLauncher} appLauncher | 18 * @param {remoting.AppLauncher} appLauncher |
| 19 * |
19 * @constructor | 20 * @constructor |
| 21 * @implements {base.Disposable} |
20 */ | 22 */ |
21 remoting.It2MeService = function(appLauncher) { | 23 remoting.It2MeService = function(appLauncher) { |
22 /** | 24 /** |
23 * @type {remoting.AppLauncher} | 25 * @type {remoting.AppLauncher} |
24 * @private | 26 * @private |
25 */ | 27 */ |
26 this.appLauncher_ = appLauncher; | 28 this.appLauncher_ = appLauncher; |
27 | 29 |
28 /** | 30 /** |
29 * @type {Array.<remoting.It2MeHelperChannel>} | 31 * @type {Array.<remoting.It2MeHelperChannel>} |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 169 } |
168 | 170 |
169 console.log('Incoming helpee connection from Hangouts'); | 171 console.log('Incoming helpee connection from Hangouts'); |
170 this.helpee_ = new remoting.It2MeHelpeeChannel( | 172 this.helpee_ = new remoting.It2MeHelpeeChannel( |
171 hangoutPort, | 173 hangoutPort, |
172 new remoting.It2MeHostFacade(), | 174 new remoting.It2MeHostFacade(), |
173 new remoting.HostInstaller(), | 175 new remoting.HostInstaller(), |
174 this.onHelpeeChannelDisconnected.bind(this)); | 176 this.onHelpeeChannelDisconnected.bind(this)); |
175 this.helpee_.init(); | 177 this.helpee_.init(); |
176 }; | 178 }; |
OLD | NEW |