| 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 * | 7 * |
| 8 * It2MeHelpeeChannel relays messages between the Hangouts web page (Hangouts) | 8 * It2MeHelpeeChannel relays messages between the Hangouts web page (Hangouts) |
| 9 * and the It2Me Native Messaging Host (It2MeHost) for the helpee (the Hangouts | 9 * and the It2Me Native Messaging Host (It2MeHost) for the helpee (the Hangouts |
| 10 * participant who is receiving remoting assistance). | 10 * participant who is receiving remoting assistance). |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 /** @param {boolean} installed */ | 208 /** @param {boolean} installed */ |
| 209 function sendResponse(installed) { | 209 function sendResponse(installed) { |
| 210 var MessageTypes = remoting.It2MeHelpeeChannel.HangoutMessageTypes; | 210 var MessageTypes = remoting.It2MeHelpeeChannel.HangoutMessageTypes; |
| 211 that.hangoutPort_.postMessage({ | 211 that.hangoutPort_.postMessage({ |
| 212 method: MessageTypes.IS_HOST_INSTALLED_RESPONSE, | 212 method: MessageTypes.IS_HOST_INSTALLED_RESPONSE, |
| 213 result: installed | 213 result: installed |
| 214 }); | 214 }); |
| 215 } | 215 } |
| 216 | 216 |
| 217 this.hostInstaller_.isInstalled().then( | 217 remoting.HostInstaller.isInstalled().then( |
| 218 sendResponse, | 218 sendResponse, |
| 219 /** @type {function(*):void} */(this.sendErrorResponse_.bind(this, message)) | 219 /** @type {function(*):void} */(this.sendErrorResponse_.bind(this, message)) |
| 220 ); | 220 ); |
| 221 }; | 221 }; |
| 222 | 222 |
| 223 /** | 223 /** |
| 224 * @param {{method:string, data:Object.<string,*>}} message | 224 * @param {{method:string, data:Object.<string,*>}} message |
| 225 * @private | 225 * @private |
| 226 */ | 226 */ |
| 227 remoting.It2MeHelpeeChannel.prototype.handleDownloadHost_ = function(message) { | 227 remoting.It2MeHelpeeChannel.prototype.handleDownloadHost_ = function(message) { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 | 488 |
| 489 console.error('Error responding to message method:' + | 489 console.error('Error responding to message method:' + |
| 490 (incomingMessage ? incomingMessage.method : 'null') + | 490 (incomingMessage ? incomingMessage.method : 'null') + |
| 491 ' error:' + error); | 491 ' error:' + error); |
| 492 this.hangoutPort_.postMessage({ | 492 this.hangoutPort_.postMessage({ |
| 493 method: remoting.It2MeHelpeeChannel.HangoutMessageTypes.ERROR, | 493 method: remoting.It2MeHelpeeChannel.HangoutMessageTypes.ERROR, |
| 494 message: error, | 494 message: error, |
| 495 request: incomingMessage | 495 request: incomingMessage |
| 496 }); | 496 }); |
| 497 }; | 497 }; |
| OLD | NEW |