| 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 * @param {Array.<string>} experiments List of enabled experiments. | 422 * @param {Array.<string>} experiments List of enabled experiments. |
| 423 * @private | 423 * @private |
| 424 */ | 424 */ |
| 425 remoting.ClientPluginImpl.prototype.connectWithExperiments_ = function( | 425 remoting.ClientPluginImpl.prototype.connectWithExperiments_ = function( |
| 426 host, localJid, credentialsProvider, experiments) { | 426 host, localJid, credentialsProvider, experiments) { |
| 427 var keyFilter = ''; | 427 var keyFilter = ''; |
| 428 if (remoting.platformIsMac()) { | 428 if (remoting.platformIsMac()) { |
| 429 keyFilter = 'mac'; | 429 keyFilter = 'mac'; |
| 430 } else if (remoting.platformIsChromeOS()) { | 430 } else if (remoting.platformIsChromeOS()) { |
| 431 keyFilter = 'cros'; | 431 keyFilter = 'cros'; |
| 432 } else if (remoting.platformIsWindows()) { |
| 433 keyFilter = 'windows'; |
| 432 } | 434 } |
| 433 | 435 |
| 434 this.plugin_.postMessage(JSON.stringify( | 436 this.plugin_.postMessage(JSON.stringify( |
| 435 { method: 'delegateLargeCursors', data: {} })); | 437 { method: 'delegateLargeCursors', data: {} })); |
| 436 this.credentials_ = credentialsProvider; | 438 this.credentials_ = credentialsProvider; |
| 437 this.useAsyncPinDialog_(); | 439 this.useAsyncPinDialog_(); |
| 438 this.plugin_.postMessage(JSON.stringify({ | 440 this.plugin_.postMessage(JSON.stringify({ |
| 439 method: 'connect', | 441 method: 'connect', |
| 440 data: { | 442 data: { |
| 441 hostJid: host.jabberId, | 443 hostJid: host.jabberId, |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 return new remoting.ClientPluginImpl(container, | 754 return new remoting.ClientPluginImpl(container, |
| 753 capabilities); | 755 capabilities); |
| 754 }; | 756 }; |
| 755 | 757 |
| 756 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { | 758 remoting.DefaultClientPluginFactory.prototype.preloadPlugin = function() { |
| 757 var plugin = remoting.ClientPluginImpl.createPluginElement_(); | 759 var plugin = remoting.ClientPluginImpl.createPluginElement_(); |
| 758 plugin.addEventListener( | 760 plugin.addEventListener( |
| 759 'loadend', function() { document.body.removeChild(plugin); }, false); | 761 'loadend', function() { document.body.removeChild(plugin); }, false); |
| 760 document.body.appendChild(plugin); | 762 document.body.appendChild(plugin); |
| 761 }; | 763 }; |
| OLD | NEW |