| 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 * Class that wraps low-level details of interacting with the client plugin. | 7 * Class that wraps low-level details of interacting with the client plugin. |
| 8 * | 8 * |
| 9 * This abstracts a <embed> element and controls the plugin which does | 9 * This abstracts a <embed> element and controls the plugin which does |
| 10 * the actual remoting work. It also handles differences between | 10 * the actual remoting work. It also handles differences between |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 keyFilter = 'windows'; | 442 keyFilter = 'windows'; |
| 443 } | 443 } |
| 444 | 444 |
| 445 this.plugin_.postMessage(JSON.stringify( | 445 this.plugin_.postMessage(JSON.stringify( |
| 446 { method: 'delegateLargeCursors', data: {} })); | 446 { method: 'delegateLargeCursors', data: {} })); |
| 447 this.credentials_ = credentialsProvider; | 447 this.credentials_ = credentialsProvider; |
| 448 this.useAsyncPinDialog_(); | 448 this.useAsyncPinDialog_(); |
| 449 this.plugin_.postMessage(JSON.stringify({ | 449 this.plugin_.postMessage(JSON.stringify({ |
| 450 method: 'connect', | 450 method: 'connect', |
| 451 data: { | 451 data: { |
| 452 hostId: host.hostId, |
| 452 hostJid: host.jabberId, | 453 hostJid: host.jabberId, |
| 453 hostPublicKey: host.publicKey, | 454 hostPublicKey: host.publicKey, |
| 454 localJid: localJid, | 455 localJid: localJid, |
| 455 sharedSecret: '', | 456 sharedSecret: '', |
| 456 authenticationTag: host.hostId, | |
| 457 capabilities: this.capabilities_.join(" "), | 457 capabilities: this.capabilities_.join(" "), |
| 458 clientPairingId: credentialsProvider.getPairingInfo().clientId, | 458 clientPairingId: credentialsProvider.getPairingInfo().clientId, |
| 459 clientPairedSecret: credentialsProvider.getPairingInfo().sharedSecret, | 459 clientPairedSecret: credentialsProvider.getPairingInfo().sharedSecret, |
| 460 keyFilter: keyFilter, | 460 keyFilter: keyFilter, |
| 461 experiments: experiments.join(" ") | 461 experiments: experiments.join(" ") |
| 462 } | 462 } |
| 463 })); | 463 })); |
| 464 }; | 464 }; |
| 465 | 465 |
| 466 /** | 466 /** |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 return new remoting.ClientPluginImpl(container, | 763 return new remoting.ClientPluginImpl(container, |
| 764 capabilities); | 764 capabilities); |
| 765 }; | 765 }; |
| 766 | 766 |
| 767 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { | 767 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { |
| 768 var plugin = remoting.ClientPluginImpl.createPluginElement_(); | 768 var plugin = remoting.ClientPluginImpl.createPluginElement_(); |
| 769 plugin.addEventListener( | 769 plugin.addEventListener( |
| 770 'loadend', function() { document.body.removeChild(plugin); }, false); | 770 'loadend', function() { document.body.removeChild(plugin); }, false); |
| 771 document.body.appendChild(plugin); | 771 document.body.appendChild(plugin); |
| 772 }; | 772 }; |
| OLD | NEW |